public final class Utility extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DYNAMIC_STUB_SUFFIX |
static String |
IDL_STUB_SUFFIX |
static String |
RMI_STUB_SUFFIX |
static String |
STUB_PREFIX |
static String |
TIE_SUFIX |
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static Object |
autoConnect(Object obj,
ORB orb,
boolean convertToStub)
Ensure that stubs, ties, and implementation objects
are 'connected' to the runtime.
|
static void |
clearCaches() |
static String |
dynamicStubName(String className) |
static Tie |
getAndForgetTie(Object stub) |
static ValueFactory |
getFactory(Class clazz,
String codebase,
ORB orb,
String repId)
Get the factory for an IDLValue
Throws MARSHAL exception if no factory found.
|
static BoxedValueHelper |
getHelper(Class clazz,
String codebase,
String repId)
Get the helper for an IDLValue
Throws MARSHAL exception if no helper found.
|
static String |
idlStubName(String className)
Create an IDL stub name.
|
static Class |
loadClassForClass(String className,
String remoteCodebase,
ClassLoader loader,
Class relatedType,
ClassLoader relatedTypeClassLoader) |
static Object |
loadStub(Object narrowFrom,
Class<?> narrowTo) |
static Remote |
loadStub(Tie tie,
PresentationManager.StubFactory stubFactory,
String remoteCodebase,
boolean onlyMostDerived) |
static Class |
loadStubClass(String repID,
String remoteCodebase,
Class expectedType) |
static Tie |
loadTie(Remote obj) |
static void |
printStackTrace() |
static void |
purgeStubForTie(Tie tie) |
static void |
purgeTieAndServant(Tie tie) |
static Object |
readAbstractAndNarrow(InputStream in,
Class narrowTo)
Read an abstract interface type from the input stream and narrow
it to the desired type.
|
static Object |
readObjectAndNarrow(InputStream in,
Class narrowTo)
Read an object reference from the input stream and narrow
it to the desired type.
|
static String |
stubName(String className)
Create an RMI stub name.
|
static String |
stubNameForCompiler(String className) |
static String |
stubNameFromRepID(String repID) |
static void |
throwNotSerializableForCorba(String className)
Throws the CORBA equivalent of a java.io.NotSerializableException
|
static String |
tieName(String className)
Create an RMI tie name.
|
static String |
tieNameForCompiler(String className) |
public static final String STUB_PREFIX
public static final String RMI_STUB_SUFFIX
public static final String DYNAMIC_STUB_SUFFIX
public static final String IDL_STUB_SUFFIX
public static final String TIE_SUFIX
public static Object autoConnect(Object obj, ORB orb, boolean convertToStub)
obj
- the object to connect.orb
- the ORB to connect to if obj is exported to IIOP.convertToStub
- true if implementation types should be
converted to Stubs rather than just org.omg.CORBA.Object.NoSuchObjectException
- if obj is an implementation
which has not been exported.public static void clearCaches()
public static Class loadClassForClass(String className, String remoteCodebase, ClassLoader loader, Class relatedType, ClassLoader relatedTypeClassLoader) throws ClassNotFoundException
ClassNotFoundException
public static BoxedValueHelper getHelper(Class clazz, String codebase, String repId)
public static ValueFactory getFactory(Class clazz, String codebase, ORB orb, String repId)
public static Remote loadStub(Tie tie, PresentationManager.StubFactory stubFactory, String remoteCodebase, boolean onlyMostDerived)
public static void purgeStubForTie(Tie tie)
public static void purgeTieAndServant(Tie tie)
public static Class loadStubClass(String repID, String remoteCodebase, Class expectedType) throws ClassNotFoundException
ClassNotFoundException
public static void throwNotSerializableForCorba(String className)
public static void printStackTrace()
public static Object readObjectAndNarrow(InputStream in, Class narrowTo) throws ClassCastException
in
- the stream to read from.ClassCastException
- if narrowFrom cannot be cast to narrowTo.public static Object readAbstractAndNarrow(InputStream in, Class narrowTo) throws ClassCastException
in
- the stream to read from.ClassCastException
- if narrowFrom cannot be cast to narrowTo.Copyright © 2020 JBoss by Red Hat. All rights reserved.