Class ORBImpl
- All Implemented Interfaces:
TypeCodeFactory
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ORB
ORB.DebugFlagResult, ORB.DummyServant -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BadServerIdHandlerprivate final ObjectThe bad server id handler is used by the Locator to send back the location of a persistant server to the client.private ClientDelegateFactoryprivate final Object/////////////////////////////////////////////////private ThreadLocal<org.glassfish.pfl.basic.contain.StackImpl<ClientInvocationInfo>> private CodeBaseprivate IORprivate ORBDataprivate CopierManagerprivate ContactInfoListFactoryprivate ReentrantReadWriteLockprivate Lockprivate Lockprivate ServerRequestDispatcherprivate InvocationInterceptorprivate final Objectprivate ThreadLocal<Boolean> protected LegacyServerSocketManagerprivate final Objectprivate static Stringprivate LocalResolverprivate AtomicIntegerprivate final AtomicIntegerprivate ThreadLocal<org.glassfish.pfl.basic.contain.StackImpl<OAInvocationInfo>> private org.glassfish.pfl.basic.concurrent.WeakCache<ByteArrayWrapper, ObjectKeyCacheEntry> private ObjectKeyFactoryprivate final Objectprivate booleanprivate ThreadLocal<ORBVersion> private PIHandlerprivate org.glassfish.pfl.basic.contain.ResourceFactory<POAFactory> private RequestDispatcherRegistryprivate Resolverprivate final Objectprivate Stringprivate final Objectprivate ServiceContextFactoryRegistryprivate ServiceContextsCacheprivate booleanprivate final Objectprivate final ReadWriteLockprivate byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate final SynchVariableprivate TaggedComponentFactoryFinderprivate IdentifiableFactoryFinder<TaggedProfile> private final Objectprivate ThreadPoolManagerprivate org.glassfish.pfl.basic.contain.ResourceFactory<TOAFactory> private intprotected TransportManagerprivate Map<Class<?>, TypeCodeImpl> private Operationprivate final Objectprivate Map<String, ValueFactory> private final ObjectFields inherited from class ORB
cdrCacheDebugFlag, cdrDebugFlag, dynamicTypeDebugFlag, folbDebugFlag, giopDebugFlag, giopReadDebugFlag, giopSizeDebugFlag, interceptorDebugFlag, isLocalDebugFlag, mbeanDebugFlag, mbeanFineDebugFlag, mbeanRuntimeDebugFlag, mom, namingDebugFlag, omgWrapper, operationTraceDebugFlag, orbdDebugFlag, orbInitDebug, orbLifecycleDebugFlag, osgiDebugFlag, poaDebugFlag, poaFSMDebugFlag, serviceContextDebugFlag, shutdownDebugFlag, streamFormatVersionDebugFlag, subcontractDebugFlag, transientObjectManagerDebugFlag, transportDebugFlag, valueHandlerDebugFlag, wrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidprivate voidconfigDataParsingComplete(String oRBId) voidConnects the given servant object (a Java object that is an instance of the server implementation class) to the ORB.create_abstract_interface_tc(String id, String name) Create aTypeCodeobject for an IDL abstract interface.create_alias_tc(String id, String name, TypeCode original_type) Create a TypeCode for an alias.Creates an IDLAnyobject initialized to contain aTypecodeobject whosekindfield is set toTCKind.tc_null.create_array_tc(int length, TypeCode element_type) Creates aTypeCodeobject representing an IDLarray.Create a ContextListcreate_enum_tc(String id, String name, String[] members) Create a TypeCode for an enum.Create an EnvironmentCreate an ExceptionListcreate_exception_tc(String id, String name, StructMember[] members) Create a TypeCode for an exception.create_fixed_tc(short digits, short scale) Create aTypeCodeobject for an IDL fixed type.create_interface_tc(String id, String name) Create a TypeCode for an interface.create_list(int count) Create an NVListcreate_named_value(String s, Any any, int flags) Create a NamedValuecreate_native_tc(String id, String name) Create aTypeCodeobject for an IDL native type.create_operation_list(Object oper) Create an NVList corresponding to an OperationDefThe following methods are standard public CORBA ORB APIscreate_policy(int type, Any val) Can be invoked to create new instances of policy objects of a specific type with specified initial state.create_recursive_sequence_tc(int bound, int offset) Creates aTypeCodeobject representing a a recursive IDLsequence.Create a recursiveTypeCodeobject which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion.create_sequence_tc(int bound, TypeCode element_type) Creates aTypeCodeobject representing an IDLsequence.create_string_tc(int bound) Create a TypeCode for a string.create_struct_tc(String id, String name, StructMember[] members) Create a TypeCode for a structure.create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members) Create a TypeCode for a union.create_value_box_tc(String id, String name, TypeCode boxed_type) Creates aTypeCodeobject for an IDL value box.create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) Create aTypeCodeobject for an IDL value type.create_wstring_tc(int bound) Create a TypeCode for a wide string.voidvoiddestroy()formal/99-10-07 p 159: "If destroy is called on an ORB that has not been shut down, it will start the shutdown process and block until the ORB has shut down before it destroys the ORB."voiddisconnect(Object obj) Disconnects the given servant object from the ORB.extractObjectKeyCacheEntry(byte[] objKey) The singleton ORB does not need the cache, so just return null here.voidDeprecated.Get the default Context objectGet the next request that has gotten a response.get_primitive_tc(TCKind tcKind) Get the TypeCode for a primitive type.Returns the ClientDelegateFactory, which is used to create the ClientDelegate that represents an IORReturns the CorbaContactInfoListFactory, which creates the contact info list that represents possible endpoints in an IOR.Returns the IOR used for the Full Value Descriptionprivate StringgetHostName(String host) The following public methods are for ORB shutdown.Obtain the InvocationInterceptor for this ORB instance.Get the IOR for the CORBA object.private StringGet the LocalResolver used in this ORB./////////////////////////////////////////////////Returns the implementation version of the ORBprivate POAFactoryThe RequestDispatcher registry, which contains the request handling codeGet the resolver used in this ORB.Returns the registry for all ServerContext factories of this server.Returns the cache used to optimise marshaling of ServiceContextsFactory finders for the various parts of the IOR: tagged components, tagged profiles, and tagged profile templates.Factory finders for the various parts of the IOR: tagged profilesFactory finders for the various parts of the IOR: tagged profile templatesprivate TOAFactoryintReturn this ORB's transient server ID.Returns a name for this ORB that is based on the ORB id (if any) and guaranteed to be unique within the ClassLoader that loaded the ORB class.Get the operation used in string_to_object calls.voidhandleBadServerId(ObjectKey okey) Handle a bad server id for the given object key.voidprivate voidinitializationComplete(String oRBId) private voidprivate voidprivate voidbooleanbooleanisLocalHost(String hostName) booleanisLocalServerId(int subcontractId, int serverId) private voidisLocalServerIdInfo(int subcontractId, int serverId, int transientServerId, boolean aTransient, boolean persistentServerIdInitialized, int psid) String[]The following methods deal with listing and resolving the initial (bootstrap) object references such as "NameService".lookup_value_factory(String repositoryID) Finds and returns a value factory for the given repository ID.private voidmbeansRegistereed(String oRBId) voidNotify response to ORB for get_next_responseobject_to_string(Object obj) Convert an object ref to a string.booleanReturn whether or not the ORB is shutdown.voidThis method does nothing.booleanFind out if any of the deferred invocations have a response yet.private voidpostInit(String[] params, DataCollector dataCollector) private voidpreInit(String[] params, Properties props) The following methods are ORB initializationvoidvoidregister_initial_reference(String id, Object obj) If this operation is called with an id,"Y", and an object,YY, then a subsequent call toORB.resolve_initial_references( "Y" )will return objectYY.register_value_factory(String repositoryID, ValueFactory factory) Registers a value factory for a particular repository ID.voidresolve_initial_references(String identifier) Resolves a specific object reference from the set of available initial service names.voidrun()The following methods (introduced in POA / CORBA2.1) deal with shutdown / single threading.voidSend multiple dynamic requests asynchronously.voidSends multiple dynamic (DII) requests asynchronously without expecting any responses.voidset_delegate(Object servant) Unimplemented methodprotected voidset_parameters(Applet app, Properties props) Allows the ORB implementation to be initialized with the given applet and parameters.protected voidset_parameters(String[] params, Properties props) Allows the ORB implementation to be initialized with the given parameters and properties.voidset_parameters(Properties props) voidsetBadServerIdHandler(BadServerIdHandler handler) voidvoidvoidSet the ServerRequestDispatcher that should be used for handling INS requests.voidsetInvocationInterceptor(InvocationInterceptor interceptor) Set the InvocationInterceptor for this ORB instance.voidsetLocalResolver(LocalResolver resolver) Set the LocalResolver used in this ORB.voidsetObjectKeyFactory(ObjectKeyFactory factory) voidsetORBVersion(ORBVersion verObj) voidsetParameters(String[] params, Properties props) voidsetResolver(Resolver resolver) Set the resolver used in this ORB.voidvoidsetTypeCodeForClass(Class c, TypeCodeImpl tci) voidsetURLOperation(Operation stringToObject) Set the operation used in string_to_object calls.voidshutdown(boolean wait_for_completion) Instructs the ORB to shut down, which causes all object adapters to shut down, in preparation for destruction.
If thewait_for_completionparameter is true, this operation blocks until all ORB processing (including processing of currently executing requests, object deactivation, and other object adapter operations) has completed.protected voidshutdownServants(boolean wait_for_completion) private voidstartingDestruction(String oRBId) voidprivate voidstartingShutdown(String oRBId) string_to_object(String str) Convert a stringified object reference to the object it represents.private voidvoidunregister_value_factory(String repositoryID) Unregisters a value factory for a particular repository ID.private voidbooleanThis method always returns false because the ORB never needs the main thread to do work.Methods inherited from class ORB
classCodeBaseHandler, classCodeBaseHandler, classNameResolver, classNameResolver, clearDebugFlag, clearDebugFlags, createORBManagedObjectManager, defaultClassNameResolver, get_primitive_tc, getByteBufferPool, getIOR, getLogger, getPresentationManager, getStubFactoryFactory, getTypeCode, getWireObjectKeyTemplate, initializePrimitiveTypeCodeConstants, makeCompositeClassNameResolver, mom, setDebugFlag, setDebugFlags, setRootParentObjectName, setTypeCodeMethods inherited from class ORB
get_value_defMethods inherited from class ORB
create_basic_dyn_any, create_dyn_any, create_dyn_array, create_dyn_enum, create_dyn_sequence, create_dyn_struct, create_dyn_union, get_service_information, init, init, init
-
Field Details
-
set_parameters_called
private boolean set_parameters_called -
transportManager
-
legacyServerSocketManager
-
OAInvocationInfoStack
private ThreadLocal<org.glassfish.pfl.basic.contain.StackImpl<OAInvocationInfo>> OAInvocationInfoStack -
clientInvocationInfoStack
private ThreadLocal<org.glassfish.pfl.basic.contain.StackImpl<ClientInvocationInfo>> clientInvocationInfoStack -
codeBase
-
codeBaseIOR
-
dynamicRequests
-
svResponseReceived
-
runObj
-
shutdownObj
-
numWaiters
-
waitForCompletionObj
-
STATUS_OPERATING
private static final byte STATUS_OPERATING- See Also:
-
STATUS_SHUTTING_DOWN
private static final byte STATUS_SHUTTING_DOWN- See Also:
-
STATUS_SHUTDOWN
private static final byte STATUS_SHUTDOWN- See Also:
-
STATUS_DESTROYED
private static final byte STATUS_DESTROYED- See Also:
-
statueLock
-
status
private byte status -
invocationObj
-
numInvocations
-
isProcessingInvocation
-
typeCodeForClassMap
-
valueFactoryCache
-
orbVersionThreadLocal
-
requestDispatcherRegistry
-
copierManager
-
transientServerId
private int transientServerId -
serviceContextFactoryRegistry
-
serviceContextsCache
-
toaFactory
-
poaFactory
-
pihandler
-
configData
-
badServerIdHandler
-
clientDelegateFactory
-
corbaContactInfoListFactory
-
resolver
-
localResolver
-
insNamingDelegate
-
resolverLock
-
urlOperation
-
urlOperationLock
-
taggedComponentFactoryFinder
-
taggedProfileFactoryFinder
-
taggedProfileTemplateFactoryFinder
-
objectKeyFactory
-
orbOwnsThreadPoolManager
private boolean orbOwnsThreadPoolManager -
threadpoolMgr
-
invocationInterceptor
-
objectKeyCache
private org.glassfish.pfl.basic.concurrent.WeakCache<ByteArrayWrapper, ObjectKeyCacheEntry> objectKeyCache -
idcount
-
rootName
-
badServerIdHandlerAccessLock
The bad server id handler is used by the Locator to send back the location of a persistant server to the client. -
localHostString
-
clientDelegateFactoryAccessorLock
///////////////////////////////////////////////// -
corbaContactInfoListFactoryAccessLock
-
corbaContactInfoListFactoryReadLock
-
corbaContactInfoListFactoryWriteLock
-
objectKeyFactoryAccessLock
-
legacyServerSocketManagerAccessLock
-
threadPoolManagerAccessLock
-
-
Constructor Details
-
ORBImpl
public ORBImpl()Create a new ORB. Should be followed by the appropriate set_parameters() call.
-
-
Method Details
-
getInvocationInterceptor
Description copied from class:ORBObtain the InvocationInterceptor for this ORB instance. By default this does nothing.- Specified by:
getInvocationInterceptorin classORB- Returns:
- The InvocationInterceptor.
-
setInvocationInterceptor
Description copied from class:ORBSet the InvocationInterceptor for this ORB instance. This will be used around all dynamic RMI-IIOP calls that are mediated by this ORB instance.- Specified by:
setInvocationInterceptorin classORB- Parameters:
interceptor- The InvocationInterceptor to add.
-
getORBData
/////////////////////////////////////////////////- Specified by:
getORBDatain classORB- Returns:
- Config data
-
getPIHandler
- Specified by:
getPIHandlerin classORB
-
createPIHandler
public void createPIHandler()- Specified by:
createPIHandlerin classORB
-
getORBVersion
Description copied from class:ORBReturns the implementation version of the ORB- Specified by:
getORBVersionin classORB- Returns:
- the ORB version.
-
setORBVersion
- Specified by:
setORBVersionin classORB
-
initManagedObjectManager
private void initManagedObjectManager() -
preInit
The following methods are ORB initialization -
configDataParsingComplete
-
transportInitializationComplete
-
userConfiguratorExecutionComplete
-
interceptorInitializationComplete
-
mbeansRegistereed
-
initializationComplete
-
startingShutdown
-
startingDestruction
-
isLocalServerIdInfo
@InfoMethod private void isLocalServerIdInfo(int subcontractId, int serverId, int transientServerId, boolean aTransient, boolean persistentServerIdInitialized, int psid) -
getUniqueOrbId
Description copied from class:ORBReturns a name for this ORB that is based on the ORB id (if any) and guaranteed to be unique within the ClassLoader that loaded the ORB class. This is the default implementation inherited by the ORBSingleton.- Overrides:
getUniqueOrbIdin classORB- Returns:
- a unique name
-
postInit
-
getPOAFactory
-
getTOAFactory
-
check_set_parameters
public void check_set_parameters() -
set_parameters
- Specified by:
set_parametersin classORB
-
set_parameters
Description copied from class:ORBAllows the ORB implementation to be initialized with the given applet and parameters. This method, used in applets only, is implemented by subclass ORB implementations and called by the appropriateinitmethod to pass in its parameters.- Specified by:
set_parametersin classORB- Parameters:
app- the applet; may benullprops- applet-specific properties; may benull
-
setParameters
- Specified by:
setParametersin classORB
-
set_parameters
Description copied from class:ORBAllows the ORB implementation to be initialized with the given parameters and properties. This method, used in applications only, is implemented by subclass ORB implementations and called by the appropriateinitmethod to pass in its parameters.- Specified by:
set_parametersin classORB- Parameters:
params- command-line arguments for the application'smainmethod; may benullprops- application-specific properties; may benull
-
create_output_stream
The following methods are standard public CORBA ORB APIs- Specified by:
create_output_streamin classORB- Returns:
- the newly-created
org.omg.CORBA.portable.OutputStreamobject
-
get_current
Deprecated.Get a Current pseudo-object. The Current interface is used to manage thread-specific information for use by the transactions, security and other services. This method is deprecated, and replaced by ORB.resolve_initial_references("NameOfCurrentObject");- Overrides:
get_currentin classORB- Returns:
- a Current pseudo-object.
- See Also:
-
create_list
Create an NVList- Specified by:
create_listin classORB- Parameters:
count- size of list to create- Returns:
- NVList created
- See Also:
-
create_operation_list
Create an NVList corresponding to an OperationDef- Overrides:
create_operation_listin classORB- Parameters:
oper- operation def to use to create list- Returns:
- NVList created
- See Also:
-
create_named_value
Create a NamedValue- Specified by:
create_named_valuein classORB- Parameters:
s- the name of theNamedValueobjectany- theAnyvalue to be inserted into theNamedValueobjectflags- the argument mode flags for theNamedValue: one ofARG_IN.value,ARG_OUT.value, orARG_INOUT.value.- Returns:
- NamedValue created
- See Also:
-
create_exception_list
Create an ExceptionList- Specified by:
create_exception_listin classORB- Returns:
- ExceptionList created
-
create_context_list
Create a ContextList- Specified by:
create_context_listin classORB- Returns:
- ContextList created
- See Also:
-
get_default_context
Get the default Context object- Specified by:
get_default_contextin classORB- Returns:
- the default Context object
- See Also:
-
create_environment
Create an Environment- Specified by:
create_environmentin classORB- Returns:
- Environment created
- See Also:
-
send_multiple_requests_oneway
Description copied from class:ORBSends multiple dynamic (DII) requests asynchronously without expecting any responses. Note that oneway invocations are not guaranteed to reach the server.- Specified by:
send_multiple_requests_onewayin classORB- Parameters:
req- an array of request objects
-
send_multiple_requests_deferred
Send multiple dynamic requests asynchronously.- Specified by:
send_multiple_requests_deferredin classORB- Parameters:
req- an array of request objects.
-
poll_next_response
public boolean poll_next_response()Find out if any of the deferred invocations have a response yet.- Specified by:
poll_next_responsein classORB- Returns:
trueif there is a response available;falseotherwise
-
get_next_response
Get the next request that has gotten a response.- Specified by:
get_next_responsein classORB- Returns:
- the next request ready with a response.
- Throws:
WrongTransaction- if the methodget_next_responseis called from a transaction scope different from the one from which the original request was sent. See the OMG Transaction Service specification for details.
-
notifyORB
-
object_to_string
Convert an object ref to a string.- Specified by:
object_to_stringin classORB- Parameters:
obj- The object to stringify.- Returns:
- A stringified object reference.
-
string_to_object
Convert a stringified object reference to the object it represents.- Specified by:
string_to_objectin classORB- Parameters:
str- The stringified object reference.- Returns:
- The unstringified object reference.
-
getFVDCodeBaseIOR
Description copied from class:ORBReturns the IOR used for the Full Value Description- Specified by:
getFVDCodeBaseIORin classORB- Returns:
- The IOR used for the Full Value Description
-
get_primitive_tc
Get the TypeCode for a primitive type.- Specified by:
get_primitive_tcin classORB- Parameters:
tcKind- the integer kind for the primitive type- Returns:
- the requested TypeCode
-
create_struct_tc
Create a TypeCode for a structure.- Specified by:
create_struct_tcin classORB- Parameters:
id- the logical id for the typecode.name- the name for the typecode.members- an array describing the members of the TypeCode.- Returns:
- the requested TypeCode.
-
create_union_tc
public TypeCode create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members) Create a TypeCode for a union.- Specified by:
create_union_tcin classORB- Parameters:
id- the logical id for the typecode.name- the name for the typecode.discriminator_type- the type of the union discriminator.members- an array describing the members of the TypeCode.- Returns:
- the requested TypeCode.
-
create_enum_tc
Create a TypeCode for an enum.- Specified by:
create_enum_tcin classORB- Parameters:
id- the logical id for the typecode.name- the name for the typecode.members- an array describing the members of the TypeCode.- Returns:
- the requested TypeCode.
-
create_alias_tc
Create a TypeCode for an alias.- Specified by:
create_alias_tcin classORB- Parameters:
id- the logical id for the typecode.name- the name for the typecode.original_type- the type this is an alias for.- Returns:
- the requested TypeCode.
-
create_exception_tc
Create a TypeCode for an exception.- Specified by:
create_exception_tcin classORB- Parameters:
id- the logical id for the typecode.name- the name for the typecode.members- an array describing the members of the TypeCode.- Returns:
- the requested TypeCode.
-
create_interface_tc
Create a TypeCode for an interface.- Specified by:
create_interface_tcin classORB- Parameters:
id- the logical id for the typecode.name- the name for the typecode.- Returns:
- the requested TypeCode.
-
create_string_tc
Create a TypeCode for a string.- Specified by:
create_string_tcin classORB- Parameters:
bound- the bound for the string.- Returns:
- the requested TypeCode.
-
create_wstring_tc
Create a TypeCode for a wide string.- Specified by:
create_wstring_tcin classORB- Parameters:
bound- the bound for the string.- Returns:
- the requested TypeCode.
-
create_sequence_tc
Description copied from class:ORBCreates aTypeCodeobject representing an IDLsequence. TheTypeCodeobject is initialized with the given bound and element type.- Specified by:
create_sequence_tcin classORB- Parameters:
bound- the bound for thesequence, 0 if unboundedelement_type- theTypeCodeobject describing the elements contained in thesequence- Returns:
- a newly-created
TypeCodeobject describing an IDLsequence
-
create_recursive_sequence_tc
Description copied from class:ORBCreates aTypeCodeobject representing a a recursive IDLsequence.For the IDL
structNode in following code fragment, the offset parameter for creating its sequence would be 1:Struct Node { long value; Sequence <Node> subnodes; };- Specified by:
create_recursive_sequence_tcin classORB- Parameters:
bound- the bound for the sequence, 0 if unboundedoffset- the index to the enclosingTypeCodeobject that describes the elements of this sequence- Returns:
- a newly-created
TypeCodeobject describing a recursive sequence - See Also:
-
create_array_tc
Description copied from class:ORBCreates aTypeCodeobject representing an IDLarray. TheTypeCodeobject is initialized with the given length and element type.- Specified by:
create_array_tcin classORB- Parameters:
length- the length of thearrayelement_type- aTypeCodeobject describing the type of element contained in thearray- Returns:
- a newly-created
TypeCodeobject describing an IDLarray
-
create_native_tc
Description copied from class:ORBCreate aTypeCodeobject for an IDL native type.- Overrides:
create_native_tcin classORB- Parameters:
id- the logical id for the native type.name- the name of the native type.- Returns:
- the requested TypeCode.
-
create_abstract_interface_tc
Description copied from class:ORBCreate aTypeCodeobject for an IDL abstract interface.- Overrides:
create_abstract_interface_tcin classORB- Parameters:
id- the logical id for the abstract interface type.name- the name of the abstract interface type.- Returns:
- the requested TypeCode.
-
create_fixed_tc
Description copied from class:ORBCreate aTypeCodeobject for an IDL fixed type.- Overrides:
create_fixed_tcin classORB- Parameters:
digits- specifies the total number of decimal digits in the number and must be from 1 to 31 inclusive.scale- specifies the position of the decimal point.- Returns:
- the requested TypeCode.
-
create_value_tc
public TypeCode create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) Description copied from class:ORBCreate aTypeCodeobject for an IDL value type. The concrete_base parameter is the TypeCode for the immediate concrete valuetype base of the valuetype for which the TypeCode is being created. It may be null if the valuetype does not have a concrete base.- Overrides:
create_value_tcin classORB- Parameters:
id- the logical id for the value type.name- the name of the value type.type_modifier- one of the value type modifier constants: VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLEconcrete_base- aTypeCodeobject describing the concrete valuetype basemembers- an array containing the members of the value type- Returns:
- the requested TypeCode
-
create_recursive_tc
Description copied from class:ORBCreate a recursiveTypeCodeobject which serves as a placeholder for a concrete TypeCode during the process of creating TypeCodes which contain recursion. The id parameter specifies the repository id of the type for which the recursive TypeCode is serving as a placeholder. Once the recursive TypeCode has been properly embedded in the enclosing TypeCode which corresponds to the specified repository id, it will function as a normal TypeCode. Invoking operations on the recursive TypeCode before it has been embedded in the enclosing TypeCode will result in aBAD_TYPECODEexception.For example, the following IDL type declaration contains recursion:
Struct Node { Sequence<Node> subnodes; };To create a TypeCode for struct Node, you would invoke the TypeCode creation operations as shown below:
String nodeID = "IDL:Node:1.0"; TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID)); StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) }; TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members);Also note that the following is an illegal IDL type declaration:
Struct Node { Node next; };Recursive types can only appear within sequences which can be empty. That way marshaling problems, when transmitting the struct in an Any, are avoided.
- Overrides:
create_recursive_tcin classORB- Parameters:
id- the logical id of the referenced type- Returns:
- the requested TypeCode
-
create_value_box_tc
Description copied from class:ORBCreates aTypeCodeobject for an IDL value box.- Overrides:
create_value_box_tcin classORB- Parameters:
id- the logical id for the value typename- the name of the value typeboxed_type- the TypeCode for the type- Returns:
- the requested TypeCode
-
create_any
Description copied from class:ORBCreates an IDLAnyobject initialized to contain aTypecodeobject whosekindfield is set toTCKind.tc_null.- Specified by:
create_anyin classORB- Returns:
- a newly-created
Anyobject
-
setTypeCodeForClass
-
getTypeCodeForClass
-
list_initial_services
The following methods deal with listing and resolving the initial (bootstrap) object references such as "NameService".- Specified by:
list_initial_servicesin classORB- Returns:
- an array of
Stringobjects that represent the object references for CORBA services that are initially available with this ORB
-
resolve_initial_references
Description copied from class:ORBResolves a specific object reference from the set of available initial service names.- Specified by:
resolve_initial_referencesin classORB- Parameters:
identifier- the name of the initial service as a string- Returns:
- the object reference associated with the given name
- Throws:
InvalidName- if the given name is not associated with a known service
-
register_initial_reference
Description copied from class:ORBIf this operation is called with an id,"Y", and an object,YY, then a subsequent call toORB.resolve_initial_references( "Y" )will return objectYY.- Overrides:
register_initial_referencein classORB- Parameters:
id- The ID by which the initial reference will be known.obj- The initial reference itself.- Throws:
InvalidName- if this operation is called with an empty string id or this operation is called with an id that is already registered, including the default names defined by OMG.
-
run
-
shutdown
public void shutdown(boolean wait_for_completion) Description copied from class:ORBInstructs the ORB to shut down, which causes all object adapters to shut down, in preparation for destruction.
If thewait_for_completionparameter is true, this operation blocks until all ORB processing (including processing of currently executing requests, object deactivation, and other object adapter operations) has completed. If an application does this in a thread that is currently servicing an invocation, theBAD_INV_ORDERsystem exception will be thrown with the OMG minor code 3, since blocking would result in a deadlock.
If thewait_for_completionparameter isFALSE, then shutdown may not have completed upon return.While the ORB is in the process of shutting down, the ORB operates as normal, servicing incoming and outgoing requests until all requests have been completed. Once an ORB has shutdown, only object reference management operations may be invoked on the ORB or any object reference obtained from it. An application may also invoke the
destroyoperation on the ORB itself. Invoking any other operation will throw theBAD_INV_ORDERsystem exception with the OMG minor code 4.The
ORB.runmethod will return aftershutdownhas been called. -
shutdownServants
protected void shutdownServants(boolean wait_for_completion) -
checkShutdownState
private void checkShutdownState() -
isDuringDispatch
public boolean isDuringDispatch()- Specified by:
isDuringDispatchin classORB
-
startingDispatch
public void startingDispatch()- Specified by:
startingDispatchin classORB
-
finishedDispatch
public void finishedDispatch()- Specified by:
finishedDispatchin classORB
-
destroy
-
register_value_factory
Registers a value factory for a particular repository ID.- Overrides:
register_value_factoryin classORB- Parameters:
repositoryID- the repository ID.factory- the factory.- Returns:
- the previously registered factory for the given repository ID, or null if no such factory was previously registered.
- Throws:
BAD_PARAM- if the registration fails.- See Also:
-
unregister_value_factory
Unregisters a value factory for a particular repository ID.- Overrides:
unregister_value_factoryin classORB- Parameters:
repositoryID- the repository ID.- See Also:
-
lookup_value_factory
Finds and returns a value factory for the given repository ID. The value factory returned was previously registered by a call toregister_value_factory(String, ValueFactory)or is the default factory.- Overrides:
lookup_value_factoryin classORB- Parameters:
repositoryID- the repository ID.- Returns:
- the value factory.
- Throws:
BAD_PARAM- if unable to locate a factory.- See Also:
-
peekInvocationInfo
- Specified by:
peekInvocationInfoin classORB
-
pushInvocationInfo
- Specified by:
pushInvocationInfoin classORB
-
popInvocationInfo
- Specified by:
popInvocationInfoin classORB
-
initBadServerIdHandler
public void initBadServerIdHandler()- Specified by:
initBadServerIdHandlerin classORB
-
setBadServerIdHandler
- Specified by:
setBadServerIdHandlerin classORB
-
handleBadServerId
Description copied from class:ORBHandle a bad server id for the given object key. This should always through an exception: either a ForwardException to allow another server to handle the request, or else an error indication.- Specified by:
handleBadServerIdin classORB- Parameters:
okey- The ObjectKey to check for a valid server id.
-
create_policy
Description copied from class:ORBCan be invoked to create new instances of policy objects of a specific type with specified initial state. If create_policy fails to instantiate a new Policy object due to its inability to interpret the requested type and content of the policy, it raises the PolicyError exception with the appropriate reason.- Overrides:
create_policyin classORB- Parameters:
type- the PolicyType of the policy object to be createdval- the value that will be used to set the initial state of the Policy object that is created- Returns:
- Reference to a newly created Policy object of type specified by the type parameter and initialized to a state specified by the val parameter
- Throws:
PolicyError- when the requested policy is not supported or a requested initial state for the policy is not supported.
-
connect
Description copied from class:ORBConnects the given servant object (a Java object that is an instance of the server implementation class) to the ORB. The servant class must extend theImplBaseclass corresponding to the interface that is supported by the server. The servant must thus be a CORBA object reference, and inherit fromorg.omg.CORBA.Object. Servants created by the user can start receiving remote invocations after the methodconnecthas been called. A servant may also be automatically and implicitly connected to the ORB if it is passed as an IDL parameter in an IDL method invocation on a non-local object, that is, if the servant object has to be marshalled and sent outside of the process address space.Calling the method
connecthas no effect when the servant object is already connected to the ORB.Deprecated by the OMG in favor of the Portable Object Adapter APIs.
-
disconnect
Description copied from class:ORBDisconnects the given servant object from the ORB. After this method returns, the ORB will reject incoming remote requests for the disconnected servant and will send the exceptionorg.omg.CORBA.OBJECT_NOT_EXISTback to the remote client. Thus the object appears to be destroyed from the point of view of remote clients. Note, however, that local requests issued using the servant directly do not pass through the ORB; hence, they will continue to be processed by the servant.Calling the method
disconnecthas no effect if the servant is not connected to the ORB.Deprecated by the OMG in favor of the Portable Object Adapter APIs.
- Overrides:
disconnectin classORB- Parameters:
obj- The servant object to be disconnected from the ORB
-
getTransientServerId
public int getTransientServerId()Description copied from class:ORBReturn this ORB's transient server ID. This is needed for initializing object adapters.- Specified by:
getTransientServerIdin classORB- Returns:
- The transient server id.
-
getRequestDispatcherRegistry
Description copied from class:ORBThe RequestDispatcher registry, which contains the request handling code- Specified by:
getRequestDispatcherRegistryin classORB- Returns:
- The RequestDispatcher registry
-
getServiceContextFactoryRegistry
Description copied from class:ORBReturns the registry for all ServerContext factories of this server.- Specified by:
getServiceContextFactoryRegistryin classORB- Returns:
- the registry.
-
getServiceContextsCache
Description copied from class:ORBReturns the cache used to optimise marshaling of ServiceContexts- Specified by:
getServiceContextsCachein classORB- Returns:
- the cache used
-
isLocalHost
- Specified by:
isLocalHostin classORB
-
isLocalServerId
public boolean isLocalServerId(int subcontractId, int serverId) - Specified by:
isLocalServerIdin classORB
-
getHostName
The following public methods are for ORB shutdown.- Throws:
UnknownHostException
-
getLocalHostName
-
work_pending
public boolean work_pending()This method always returns false because the ORB never needs the main thread to do work.- Overrides:
work_pendingin classORB- Returns:
trueif there is work pending, meaning that the ORB needs the main thread to perform some work;falseif there is no work pending and thus the ORB does not need the main thread
-
perform_work
public void perform_work()This method does nothing. It is not required by the spec to do anything!- Overrides:
perform_workin classORB
-
set_delegate
Description copied from class:ORBUnimplemented method- Overrides:
set_delegatein classORB- Parameters:
servant- unused- See Also:
-
invocationInfoChange
-
createOrIncrementInvocationInfo
- Specified by:
createOrIncrementInvocationInfoin classORB
-
releaseOrDecrementInvocationInfo
public void releaseOrDecrementInvocationInfo()- Specified by:
releaseOrDecrementInvocationInfoin classORB
-
getInvocationInfo
- Specified by:
getInvocationInfoin classORB
-
setClientDelegateFactory
- Specified by:
setClientDelegateFactoryin classORB
-
getClientDelegateFactory
Description copied from class:ORBReturns the ClientDelegateFactory, which is used to create the ClientDelegate that represents an IOR- Specified by:
getClientDelegateFactoryin classORB- Returns:
- The ClientDelegateFactory
-
setCorbaContactInfoListFactory
- Specified by:
setCorbaContactInfoListFactoryin classORB
-
getCorbaContactInfoListFactory
Description copied from class:ORBReturns the CorbaContactInfoListFactory, which creates the contact info list that represents possible endpoints in an IOR.- Specified by:
getCorbaContactInfoListFactoryin classORB- Returns:
- CorbaContactInfoListFactory used
-
setResolver
Description copied from class:ORBSet the resolver used in this ORB. This resolver will be used for list_initial_services and resolve_initial_references.- Specified by:
setResolverin classORB- Parameters:
resolver- resolver to be used
-
getResolver
Description copied from class:ORBGet the resolver used in this ORB. This resolver will be used for list_initial_services and resolve_initial_references.- Specified by:
getResolverin classORB- Returns:
- ORB Name resolver
-
setLocalResolver
Description copied from class:ORBSet the LocalResolver used in this ORB. This LocalResolver is used for register_initial_reference only.- Specified by:
setLocalResolverin classORB- Parameters:
resolver- ORB Local Name resolver
-
getLocalResolver
Description copied from class:ORBGet the LocalResolver used in this ORB. This LocalResolver is used for register_initial_reference only.- Specified by:
getLocalResolverin classORB- Returns:
- ORB Local Name resolver
-
setURLOperation
Description copied from class:ORBSet the operation used in string_to_object calls. The Operation must expect a String and return an org.omg.CORBA.Object.- Specified by:
setURLOperationin classORB- Parameters:
stringToObject- operation to be used
-
getURLOperation
Description copied from class:ORBGet the operation used in string_to_object calls. The Operation must expect a String and return an org.omg.CORBA.Object.- Specified by:
getURLOperationin classORB- Returns:
- operation used
-
setINSDelegate
Description copied from class:ORBSet the ServerRequestDispatcher that should be used for handling INS requests.- Specified by:
setINSDelegatein classORB- Parameters:
sdel- dispatcher to be used
-
getTaggedComponentFactoryFinder
Description copied from class:ORBFactory finders for the various parts of the IOR: tagged components, tagged profiles, and tagged profile templates.- Specified by:
getTaggedComponentFactoryFinderin classORB- Returns:
- Finder of Factories for TaggedComponents of IORs
-
getTaggedProfileFactoryFinder
Description copied from class:ORBFactory finders for the various parts of the IOR: tagged profiles- Specified by:
getTaggedProfileFactoryFinderin classORB- Returns:
- Finder of Factories for TaggedProfiles of IORs
-
getTaggedProfileTemplateFactoryFinder
Description copied from class:ORBFactory finders for the various parts of the IOR: tagged profile templates- Specified by:
getTaggedProfileTemplateFactoryFinderin classORB- Returns:
- Finder of Factories for TaggedProfileTemplates of IORs
-
getObjectKeyFactory
- Specified by:
getObjectKeyFactoryin classORB
-
setObjectKeyFactory
- Specified by:
setObjectKeyFactoryin classORB
-
getTransportManager
- Specified by:
getTransportManagerin classORB
-
getCorbaTransportManager
- Specified by:
getCorbaTransportManagerin classORB
-
getLegacyServerSocketManager
- Specified by:
getLegacyServerSocketManagerin classORB
-
setThreadPoolManager
- Specified by:
setThreadPoolManagerin classORB
-
getThreadPoolManager
- Specified by:
getThreadPoolManagerin classORB
-
getCopierManager
- Specified by:
getCopierManagerin classORB
-
getIOR
Description copied from class:ORBGet the IOR for the CORBA object. If the object is an RMI-IIOP object that is not connected, and connectIfNecessary is true, connect to this ORB. This method will obtain an IOR for any non-local CORBA object, regardless of what ORB implementation created it. It may be more efficient for objrefs that were created by this ORB implementation. -
extractObjectKeyCacheEntry
Description copied from class:ORBThe singleton ORB does not need the cache, so just return null here.- Overrides:
extractObjectKeyCacheEntryin classORB- Parameters:
objKey- ignored- Returns:
- null
-
orbIsShutdown
public boolean orbIsShutdown()Description copied from class:ORBReturn whether or not the ORB is shutdown. A shutdown ORB cannot process incoming requests.- Overrides:
orbIsShutdownin classORB- Returns:
- true
-