public final class ORBUtility extends Object
Modifier and Type | Method and Description |
---|---|
static int |
bytesToInt(byte[] array,
int offset)
Unmarshal a byte array to an integer.
|
static String |
classNameOf(String repositoryId)
Get the class name corresponding to a particular repository Id.
|
static int |
compareVersion(int[] v1,
int[] v2)
Compare two version arrays.
|
static int |
compareVersion(String v1,
String v2)
Compare two version strings.
|
static String[] |
concatenateStringArrays(String[] arr1,
String[] arr2) |
static IOR |
connectAndGetIOR(ORB orb,
Object obj)
Obtains an IOR for the object reference obj, first connecting it to
the ORB if necessary.
|
static ValueHandler |
createValueHandler()
Return default ValueHandler
|
static void |
dprint(Object obj,
String msg) |
static void |
dprint(Object caller,
String msg,
Throwable t) |
void |
dprint(String msg) |
static void |
dprint(String className,
String msg) |
static void |
dprintTrace(Object obj,
String msg) |
static SystemException |
extractSystemException(Any any) |
static String |
getClassSecurityInfo(Class cl) |
static byte |
getEncodingVersion(ORB orb,
IOR ior) |
static IOR |
getIOR(Object obj)
This method obtains an IOR from a CORBA object reference.
|
static byte |
getMaxStreamFormatVersion()
Returns the maximum stream format version supported by our
ValueHandler.
|
static String |
getThreadName(Thread thr) |
static int |
hexOf(char x)
Converts an Ascii Character into Hexadecimal digit
|
static void |
insertSystemException(SystemException ex,
Any any)
Static method for writing a CORBA standard exception to an Any.
|
static void |
intToBytes(int value,
byte[] array,
int offset)
Marshal an integer to a byte array.
|
static boolean |
isForeignORB(ORB orb)
Returns true if it was accurately determined that the remote ORB is
a foreign (non-JavaSoft) ORB.
|
static boolean |
isPrintable(char c) |
static boolean |
isSystemException(String repositoryId)
Return true if this repositoryId is a SystemException.
|
static CorbaClientDelegate |
makeClientDelegate(IOR ior) |
static Object |
makeObjectReference(IOR ior)
This method is used to create untyped object references.
|
static String |
operationNameAndRequestId(CorbaMessageMediator m) |
static int[] |
parseVersion(String version)
Parse a version string such as "1.1.6" or "jdk1.2fcs" into
a version array of integers {1, 1, 6} or {1, 2}.
|
static SystemException |
readSystemException(InputStream strm)
Static method for reading a CORBA standard exception from a stream.
|
static String |
repositoryIdOf(String name)
Get the repository id corresponding to a particular class.
|
static void |
throwNotSerializableForCorba(String className)
Throws the CORBA equivalent of a java.io.NotSerializableException
Duplicated from util/Utility for Pure ORB reasons.
|
static void |
writeSystemException(SystemException ex,
OutputStream strm)
Static method for writing a CORBA standard exception to a stream.
|
public static void insertSystemException(SystemException ex, Any any)
any
- The Any to write the SystemException into.public static SystemException extractSystemException(Any any)
public static ValueHandler createValueHandler()
public static boolean isForeignORB(ORB orb)
public static int bytesToInt(byte[] array, int offset)
array
- The array of bytes.offset
- The offset from which to start unmarshalling.public static void intToBytes(int value, byte[] array, int offset)
array
- The array of bytes.offset
- The offset from which to start marshalling.public static int hexOf(char x)
public static void writeSystemException(SystemException ex, OutputStream strm)
strm
- The OutputStream to use for marshaling.public static SystemException readSystemException(InputStream strm)
strm
- The InputStream to use for unmarshaling.public static String classNameOf(String repositoryId)
repositoryId
- The repository Id for which we want a class name.public static boolean isSystemException(String repositoryId)
repositoryId
- The repository Id to check.public static byte getEncodingVersion(ORB orb, IOR ior)
public static String repositoryIdOf(String name)
name
- The class name of the system exception.public static int[] parseVersion(String version)
public static int compareVersion(int[] v1, int[] v2)
public static int compareVersion(String v1, String v2)
public void dprint(String msg)
public static String[] concatenateStringArrays(String[] arr1, String[] arr2)
public static void throwNotSerializableForCorba(String className)
public static byte getMaxStreamFormatVersion()
public static CorbaClientDelegate makeClientDelegate(IOR ior)
public static Object makeObjectReference(IOR ior)
public static IOR getIOR(Object obj)
BAD_OPERATION
- (from oi._get_delegate) if obj is a
normal objref, but does not have a delegate set.BAD_PARAM
- if obj is a local object, or else was
created by a foreign ORB.public static IOR connectAndGetIOR(ORB orb, Object obj)
BAD_OPERATION
- if the object could not be connected,
if a connection attempt was needed.BAD_PARAM
- if obj is a local object, or else was
created by a foreign ORB.public static String operationNameAndRequestId(CorbaMessageMediator m)
public static boolean isPrintable(char c)
Copyright © 2019 JBoss by Red Hat. All rights reserved.