public final class Util
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static EncodingVersion |
Encoding_1_0 |
static EncodingVersion |
Encoding_1_1 |
static ProtocolVersion |
Protocol_1_0 |
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
createInputStream(Communicator communicator,
byte[] bytes)
Creates an input stream for dynamic invocation and dispatch.
|
static InputStream |
createInputStream(Communicator communicator,
byte[] bytes,
EncodingVersion v)
Creates an input stream for dynamic invocation and dispatch.
|
static OutputStream |
createOutputStream(Communicator communicator)
Creates an output stream for dynamic invocation and dispatch.
|
static OutputStream |
createOutputStream(Communicator communicator,
EncodingVersion v)
Creates an output stream for dynamic invocation and dispatch.
|
static Properties |
createProperties()
Creates a new empty property set.
|
static Properties |
createProperties(java.lang.String[] args)
Creates a property set initialized from an argument vector.
|
static Properties |
createProperties(java.lang.String[] args,
Properties defaults)
Creates a property set initialized from an argument vector.
|
static Properties |
createProperties(StringSeqHolder args)
Creates a property set initialized from an argument vector.
|
static Properties |
createProperties(StringSeqHolder args,
Properties defaults)
Creates a property set initialized from an argument vector.
|
static EncodingVersion |
currentEncoding()
Returns the supported Ice encoding version.
|
static ProtocolVersion |
currentProtocol()
Returns the supported Ice protocol version.
|
static java.lang.String |
encodingVersionToString(EncodingVersion v)
Converts an encoding version to a string.
|
static Logger |
getProcessLogger()
Returns the process-wide logger.
|
static java.lang.String |
identityToString(Identity ident)
Converts an object identity to a string.
|
static Communicator |
initialize()
Creates a communicator using a default configuration.
|
static Communicator |
initialize(InitializationData initData)
Creates a communicator.
|
static Communicator |
initialize(java.lang.String[] args)
Creates a communicator.
|
static Communicator |
initialize(java.lang.String[] args,
InitializationData initData)
Creates a communicator.
|
static Communicator |
initialize(StringSeqHolder args)
Creates a communicator.
|
static Communicator |
initialize(StringSeqHolder args,
InitializationData initData)
Creates a communicator.
|
static int |
intVersion()
Returns the Ice version as an integer in the form
A.BB.CC, where A
indicates the major version, BB indicates the minor version, and CC
indicates the patch level. |
static java.lang.String |
protocolVersionToString(ProtocolVersion v)
Converts a protocol version to a string.
|
static int |
proxyIdentityAndFacetCompare(ObjectPrx lhs,
ObjectPrx rhs)
Compares the object identities and facets of two proxies.
|
static int |
proxyIdentityCompare(ObjectPrx lhs,
ObjectPrx rhs)
Compares the object identities of two proxies.
|
static void |
setProcessLogger(Logger logger)
Changes the process-wide logger.
|
static EncodingVersion |
stringToEncodingVersion(java.lang.String version)
Converts a string to an encoding version.
|
static Identity |
stringToIdentity(java.lang.String s)
Converts a string to an object identity.
|
static ProtocolVersion |
stringToProtocolVersion(java.lang.String version)
Converts a string to a protocol version.
|
static java.lang.String |
stringVersion()
Returns the Ice version in the form
A.B.C, where A indicates the
major version, B indicates the minor version, and C indicates the
patch level. |
static InputStream |
wrapInputStream(Communicator communicator,
byte[] bytes)
Wraps encoded data with an input stream for dynamic invocation
and dispatch.
|
static InputStream |
wrapInputStream(Communicator communicator,
byte[] bytes,
EncodingVersion v)
Wraps encoded data with an input stream for dynamic invocation
and dispatch.
|
public static final ProtocolVersion Protocol_1_0
public static final EncodingVersion Encoding_1_0
public static final EncodingVersion Encoding_1_1
public static Properties createProperties()
public static Properties createProperties(StringSeqHolder args)
args - A command-line argument vector, possibly containing
options to set properties. If the command-line options include
a --Ice.Config option, the corresponding configuration
files are parsed. If the same property is set in a configuration
file and in the argument vector, the argument vector takes precedence.
This method modifies the argument vector by removing any Ice-related options.
args.public static Properties createProperties(StringSeqHolder args, Properties defaults)
args - A command-line argument vector, possibly containing
options to set properties. If the command-line options include
a --Ice.Config option, the corresponding configuration
files are parsed. If the same property is set in a configuration
file and in the argument vector, the argument vector takes precedence.
This method modifies the argument vector by removing any Ice-related options.
defaults - Default values for the property set. Settings in configuration
files and args override these defaults.public static Properties createProperties(java.lang.String[] args)
args - A command-line argument vector, possibly containing
options to set properties. If the command-line options include
a --Ice.Config option, the corresponding configuration
files are parsed. If the same property is set in a configuration
file and in the argument vector, the argument vector takes precedence.args.public static Properties createProperties(java.lang.String[] args, Properties defaults)
args - A command-line argument vector, possibly containing
options to set properties. If the command-line options include
a --Ice.Config option, the corresponding configuration
files are parsed. If the same property is set in a configuration
file and in the argument vector, the argument vector takes precedence.defaults - Default values for the property set. Settings in configuration
files and args override these defaults.public static Communicator initialize(StringSeqHolder args)
args - A command-line argument vector. Any Ice-related options
in this vector are used to intialize the communicator.
This method modifies the argument vector by removing any Ice-related options.public static Communicator initialize(java.lang.String[] args)
args - A command-line argument vector. Any Ice-related options
in this vector are used to intialize the communicator.public static Communicator initialize(StringSeqHolder args, InitializationData initData)
args - A command-line argument vector. Any Ice-related options
in this vector are used to intialize the communicator.
This method modifies the argument vector by removing any Ice-related options.initData - Additional intialization data. Property settings in args
override property settings in initData.InitializationDatapublic static Communicator initialize(java.lang.String[] args, InitializationData initData)
args - A command-line argument vector. Any Ice-related options
in this vector are used to intialize the communicator.initData - Additional intialization data. Property settings in args
override property settings in initData.InitializationDatapublic static Communicator initialize(InitializationData initData)
initData - Additional intialization data.InitializationDatapublic static Communicator initialize()
public static Identity stringToIdentity(java.lang.String s)
s - The string to convert.public static java.lang.String identityToString(Identity ident)
ident - The object identity to convert.public static int proxyIdentityCompare(ObjectPrx lhs, ObjectPrx rhs)
lhs - A proxy.rhs - A proxy.lhs compares
less than the identity in rhs; 0 if the identities
compare equal; 1, otherwise.ProxyIdentityKey,
ProxyIdentityFacetKey,
proxyIdentityAndFacetCompare(Ice.ObjectPrx, Ice.ObjectPrx)public static int proxyIdentityAndFacetCompare(ObjectPrx lhs, ObjectPrx rhs)
lhs - A proxy.rhs - A proxy.lhs compare
less than the identity and facet in rhs; 0 if the identities
and facets compare equal; 1, otherwise.ProxyIdentityFacetKey,
ProxyIdentityKey,
proxyIdentityCompare(Ice.ObjectPrx, Ice.ObjectPrx)public static InputStream createInputStream(Communicator communicator, byte[] bytes)
communicator - The communicator for the stream.bytes - An encoded request or reply.public static InputStream createInputStream(Communicator communicator, byte[] bytes, EncodingVersion v)
communicator - The communicator for the stream.bytes - An encoded request or reply.v - The desired encoding version.public static InputStream wrapInputStream(Communicator communicator, byte[] bytes)
communicator - The communicator for the stream.bytes - An encoded request or reply.public static InputStream wrapInputStream(Communicator communicator, byte[] bytes, EncodingVersion v)
communicator - The communicator for the stream.bytes - An encoded request or reply.v - The desired encoding version.public static OutputStream createOutputStream(Communicator communicator)
communicator - The communicator for the stream.public static OutputStream createOutputStream(Communicator communicator, EncodingVersion v)
communicator - The communicator for the stream.v - The desired encoding version.public static Logger getProcessLogger()
public static void setProcessLogger(Logger logger)
logger - The new process-wide logger.public static java.lang.String stringVersion()
A.B.C, where A indicates the
major version, B indicates the minor version, and C indicates the
patch level.public static int intVersion()
A.BB.CC, where A
indicates the major version, BB indicates the minor version, and CC
indicates the patch level. For example, for Ice 3.3.1, the returned value is 30301.public static ProtocolVersion stringToProtocolVersion(java.lang.String version)
version - The string to convert.public static EncodingVersion stringToEncodingVersion(java.lang.String version)
version - The string to convert.public static java.lang.String protocolVersionToString(ProtocolVersion v)
v - The protocol version to convert.public static java.lang.String encodingVersionToString(EncodingVersion v)
v - The encoding version to convert.public static ProtocolVersion currentProtocol()
public static EncodingVersion currentEncoding()