public class ORBImpl extends ORB
| Modifier and Type | Field and Description |
|---|---|
protected LegacyServerSocketManager |
legacyServerSocketManager |
protected TransportManager |
transportManager |
giopDebugFlag, giopVersionDebugFlag, invocationTimingDebugFlag, monitoringManager, namingDebugFlag, omgWrapper, orbdDebugFlag, ORBInitDebug, poaConcurrencyDebugFlag, poaDebugFlag, poaFSMDebugFlag, serviceContextDebugFlag, shutdownDebugFlag, staticWrapper, subcontractDebugFlag, transientObjectManagerDebugFlag, transportDebugFlag, wrapper| Constructor and Description |
|---|
ORBImpl()
Create a new ORB.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkShutdownState() |
void |
connect(Object servant)
This is the implementation of the public API used to connect
a servant-skeleton to the ORB.
|
TypeCode |
create_abstract_interface_tc(String id,
String name)
Create a
TypeCode object for an IDL abstract interface. |
TypeCode |
create_alias_tc(String id,
String name,
TypeCode original_type)
Create a TypeCode for an alias.
|
Any |
create_any()
Create a new Any
|
TypeCode |
create_array_tc(int length,
TypeCode element_type)
Create a TypeCode for an array.
|
ContextList |
create_context_list()
Create a ContextList
|
TypeCode |
create_enum_tc(String id,
String name,
String[] members)
Create a TypeCode for an enum.
|
Environment |
create_environment()
Create an Environment
|
ExceptionList |
create_exception_list()
Create an ExceptionList
|
TypeCode |
create_exception_tc(String id,
String name,
StructMember[] members)
Create a TypeCode for an exception.
|
TypeCode |
create_fixed_tc(short digits,
short scale)
Create a
TypeCode object for an IDL fixed type. |
TypeCode |
create_interface_tc(String id,
String name)
Create a TypeCode for an interface.
|
NVList |
create_list(int count)
Create an NVList
|
NamedValue |
create_named_value(String s,
Any any,
int flags)
Create a NamedValue
|
TypeCode |
create_native_tc(String id,
String name)
Create a
TypeCode object for an IDL native type. |
NVList |
create_operation_list(Object oper)
Create an NVList corresponding to an OperationDef
|
OutputStream |
create_output_stream()
The following methods are standard public CORBA ORB APIs
|
Policy |
create_policy(int type,
Any val)
Can be invoked to create new instances of policy objects
of a specific type with specified initial state.
|
TypeCode |
create_recursive_sequence_tc(int bound,
int offset)
Create a recursive TypeCode in a sequence.
|
TypeCode |
create_recursive_tc(String id)
Create a recursive
TypeCode object which
serves as a placeholder for a concrete TypeCode during the process of creating
TypeCodes which contain recursion. |
TypeCode |
create_sequence_tc(int bound,
TypeCode element_type)
Create a TypeCode for a sequence.
|
TypeCode |
create_string_tc(int bound)
Create a TypeCode for a string.
|
TypeCode |
create_struct_tc(String id,
String name,
StructMember[] members)
Create a TypeCode for a structure.
|
TypeCode |
create_union_tc(String id,
String name,
TypeCode discriminator_type,
UnionMember[] members)
Create a TypeCode for a union.
|
TypeCode |
create_value_box_tc(String id,
String name,
TypeCode boxed_type)
Creates a
TypeCode object for an IDL value box. |
TypeCode |
create_value_tc(String id,
String name,
short type_modifier,
TypeCode concrete_base,
ValueMember[] members)
Create a
TypeCode object for an IDL value type. |
TypeCode |
create_wstring_tc(int bound)
Create a TypeCode for a wide string.
|
ClientInvocationInfo |
createOrIncrementInvocationInfo() |
void |
destroy()
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."
|
void |
disconnect(Object obj)
Disconnects the given servant object from the ORB.
|
void |
finishedDispatch() |
Current |
get_current()
Deprecated.
|
Context |
get_default_context()
Get the default Context object
|
Request |
get_next_response()
Get the next request that has gotten a response.
|
TypeCode |
get_primitive_tc(TCKind tcKind)
Get the TypeCode for a primitive type.
|
ClientDelegateFactory |
getClientDelegateFactory() |
CopierManager |
getCopierManager() |
CorbaContactInfoListFactory |
getCorbaContactInfoListFactory() |
CorbaTransportManager |
getCorbaTransportManager() |
IOR |
getFVDCodeBaseIOR() |
ClientInvocationInfo |
getInvocationInfo() |
LegacyServerSocketManager |
getLegacyServerSocketManager() |
LocalResolver |
getLocalResolver()
Get the LocalResolver used in this ORB.
|
ObjectKeyFactory |
getObjectKeyFactory() |
ORBData |
getORBData() |
ORBVersion |
getORBVersion() |
PIHandler |
getPIHandler() |
RequestDispatcherRegistry |
getRequestDispatcherRegistry() |
Resolver |
getResolver()
Get the resolver used in this ORB.
|
ServiceContextRegistry |
getServiceContextRegistry() |
TaggedComponentFactoryFinder |
getTaggedComponentFactoryFinder()
Factory finders for the various parts of the IOR: tagged components, tagged
profiles, and tagged profile templates.
|
IdentifiableFactoryFinder |
getTaggedProfileFactoryFinder() |
IdentifiableFactoryFinder |
getTaggedProfileTemplateFactoryFinder() |
ThreadPoolManager |
getThreadPoolManager() |
int |
getTransientServerId()
Return this ORB's transient server ID.
|
TransportManager |
getTransportManager() |
TypeCodeImpl |
getTypeCodeForClass(Class c) |
Operation |
getURLOperation()
Get the operation used in string_to_object calls.
|
void |
handleBadServerId(ObjectKey okey)
Handle a bad server id for the given object key.
|
void |
initBadServerIdHandler() |
boolean |
isDuringDispatch() |
boolean |
isLocalHost(String hostName) |
boolean |
isLocalServerId(int subcontractId,
int serverId) |
String[] |
list_initial_services()
Get a list of the initially available CORBA services.
|
ValueFactory |
lookup_value_factory(String repositoryID)
Finds and returns a value factory for the given repository ID.
|
void |
notifyORB()
Notify response to ORB for get_next_response
|
String |
object_to_string(Object obj)
Convert an object ref to a string.
|
OAInvocationInfo |
peekInvocationInfo() |
void |
perform_work()
This method does nothing.
|
boolean |
poll_next_response()
Find out if any of the deferred invocations have a response yet.
|
OAInvocationInfo |
popInvocationInfo() |
void |
pushInvocationInfo(OAInvocationInfo info) |
void |
register_initial_reference(String id,
Object obj)
If this operation is called with an id,
"Y", and an
object, YY, then a subsequent call to
ORB.resolve_initial_references( "Y" ) will
return object YY. |
ValueFactory |
register_value_factory(String repositoryID,
ValueFactory factory)
Registers a value factory for a particular repository ID.
|
void |
releaseOrDecrementInvocationInfo() |
Object |
resolve_initial_references(String identifier)
Resolve the stringified reference of one of the initially
available CORBA services.
|
void |
run()
The following methods (introduced in POA / CORBA2.1) deal with
shutdown / single threading.
|
void |
send_multiple_requests_deferred(Request[] req)
Send multiple dynamic requests asynchronously.
|
void |
send_multiple_requests_oneway(Request[] req)
Sends multiple dynamic (DII) requests asynchronously without expecting
any responses.
|
void |
set_delegate(Object servant) |
protected void |
set_parameters(Applet app,
Properties props)
Allows the ORB implementation to be initialized with the given
applet and parameters.
|
void |
set_parameters(Properties props) |
protected void |
set_parameters(String[] params,
Properties props)
Allows the ORB implementation to be initialized with the given
parameters and properties.
|
void |
setBadServerIdHandler(BadServerIdHandler handler) |
void |
setClientDelegateFactory(ClientDelegateFactory factory) |
void |
setCorbaContactInfoListFactory(CorbaContactInfoListFactory factory) |
protected void |
setDebugFlags(String[] args) |
void |
setINSDelegate(CorbaServerRequestDispatcher sdel)
Set the ServerRequestDispatcher that should be used for handling INS requests.
|
void |
setLocalResolver(LocalResolver resolver)
Set the LocalResolver used in this ORB.
|
void |
setObjectKeyFactory(ObjectKeyFactory factory) |
void |
setORBVersion(ORBVersion verObj) |
void |
setResolver(Resolver resolver)
Set the resolver used in this ORB.
|
void |
setThreadPoolManager(ThreadPoolManager mgr) |
void |
setTypeCodeForClass(Class c,
TypeCodeImpl tci) |
void |
setURLOperation(Operation stringToObject)
Set the operation used in string_to_object calls.
|
void |
shutdown(boolean wait_for_completion)
Instructs the ORB to shut down, which causes all
object adapters to shut down, in preparation for destruction.
If the wait_for_completion parameter
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 void |
shutdownServants(boolean wait_for_completion) |
void |
startingDispatch() |
Object |
string_to_object(String str)
Convert a stringified object reference to the object it represents.
|
void |
unregister_value_factory(String repositoryID)
Unregisters a value factory for a particular repository ID.
|
boolean |
work_pending()
This method always returns false because the ORB never needs the
main thread to do work.
|
get_primitive_tc, getByteBufferPool, getLogger, getLogWrapper, getMonitoringManager, getPresentationManager, getStubFactoryFactory, getTypeCode, setTypeCode, staticGetLogger, staticGetLogWrapperget_value_defcreate_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, initprotected TransportManager transportManager
protected LegacyServerSocketManager legacyServerSocketManager
public ORBImpl()
public ORBData getORBData()
getORBData in class ORBpublic PIHandler getPIHandler()
getPIHandler in class ORBpublic ORBVersion getORBVersion()
getORBVersion in class ORBpublic void setORBVersion(ORBVersion verObj)
setORBVersion in class ORBprotected void setDebugFlags(String[] args)
public void set_parameters(Properties props)
set_parameters in class ORBprotected void set_parameters(Applet app, Properties props)
ORBinit method to pass in its parameters.set_parameters in class ORBapp - the applet; may be nullprops - applet-specific properties; may be nullprotected void set_parameters(String[] params, Properties props)
ORBinit method to pass in its parameters.set_parameters in class ORBparams - command-line arguments for the application's main
method; may be nullprops - application-specific properties; may be nullpublic OutputStream create_output_stream()
create_output_stream in class ORBorg.omg.CORBA.portable.OutputStream objectpublic Current get_current()
get_current in class ORBCORBA package
comments for unimplemented featurespublic NVList create_list(int count)
create_list in class ORBcount - size of list to createNVListNVListpublic NVList create_operation_list(Object oper)
create_operation_list in class ORBoper - operation def to use to create listNVList object containing
descriptions of the arguments to the method described in the given
OperationDef objectNVListpublic NamedValue create_named_value(String s, Any any, int flags)
create_named_value in class ORBs - the name of the NamedValue objectany - the Any value to be inserted into the
NamedValue objectflags - the argument mode flags for the NamedValue: one of
ARG_IN.value, ARG_OUT.value,
or ARG_INOUT.value.NamedValue objectNamedValuepublic ExceptionList create_exception_list()
create_exception_list in class ORBExceptionList objectpublic ContextList create_context_list()
create_context_list in class ORBContextList objectContextList,
Contextpublic Context get_default_context()
get_default_context in class ORBContext objectContextpublic Environment create_environment()
create_environment in class ORBEnvironment objectEnvironmentpublic void send_multiple_requests_oneway(Request[] req)
ORBsend_multiple_requests_oneway in class ORBreq - an array of request objectspublic void send_multiple_requests_deferred(Request[] req)
send_multiple_requests_deferred in class ORBreq - an array of request objects.public boolean poll_next_response()
poll_next_response in class ORBtrue if there is a response available;
false otherwisepublic Request get_next_response() throws WrongTransaction
get_next_response in class ORBRequest object ready with a responseWrongTransaction - if the method get_next_response
is called from a transaction scope different
from the one from which the original request was sent. See the
OMG Transaction Service specification for details.public void notifyORB()
public String object_to_string(Object obj)
object_to_string in class ORBobj - The object to stringify.public Object string_to_object(String str)
string_to_object in class ORBstr - The stringified object reference.public IOR getFVDCodeBaseIOR()
getFVDCodeBaseIOR in class ORBpublic TypeCode get_primitive_tc(TCKind tcKind)
get_primitive_tc in class ORBtcKind - the integer kind for the primitive typepublic TypeCode create_struct_tc(String id, String name, StructMember[] members)
create_struct_tc in class ORBid - the logical id for the typecode.name - the name for the typecode.members - an array describing the members of the TypeCode.public TypeCode create_union_tc(String id, String name, TypeCode discriminator_type, UnionMember[] members)
create_union_tc in class ORBid - 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.public TypeCode create_enum_tc(String id, String name, String[] members)
create_enum_tc in class ORBid - the logical id for the typecode.name - the name for the typecode.members - an array describing the members of the TypeCode.public TypeCode create_alias_tc(String id, String name, TypeCode original_type)
create_alias_tc in class ORBid - the logical id for the typecode.name - the name for the typecode.original_type - the type this is an alias for.public TypeCode create_exception_tc(String id, String name, StructMember[] members)
create_exception_tc in class ORBid - the logical id for the typecode.name - the name for the typecode.members - an array describing the members of the TypeCode.public TypeCode create_interface_tc(String id, String name)
create_interface_tc in class ORBid - the logical id for the typecode.name - the name for the typecode.public TypeCode create_string_tc(int bound)
create_string_tc in class ORBbound - the bound for the string.public TypeCode create_wstring_tc(int bound)
create_wstring_tc in class ORBbound - the bound for the string.public TypeCode create_sequence_tc(int bound, TypeCode element_type)
create_sequence_tc in class ORBbound - the bound for the sequence.element_type - the type of elements of the sequence.public TypeCode create_recursive_sequence_tc(int bound, int offset)
create_recursive_sequence_tc in class ORBbound - the bound for the sequence.offset - the index to the enclosing TypeCode that is
being referenced.create_recursive_tc,
create_sequence_tcpublic TypeCode create_array_tc(int length, TypeCode element_type)
create_array_tc in class ORBlength - the length of the array.element_type - the type of elements of the array.public TypeCode create_native_tc(String id, String name)
ORBTypeCode object for an IDL native type.create_native_tc in class ORBid - the logical id for the native type.name - the name of the native type.public TypeCode create_abstract_interface_tc(String id, String name)
ORBTypeCode object for an IDL abstract interface.create_abstract_interface_tc in class ORBid - the logical id for the abstract interface type.name - the name of the abstract interface type.public TypeCode create_fixed_tc(short digits, short scale)
ORBTypeCode object for an IDL fixed type.create_fixed_tc in class ORBdigits - 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.public TypeCode create_value_tc(String id, String name, short type_modifier, TypeCode concrete_base, ValueMember[] members)
ORBTypeCode object 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.create_value_tc in class ORBid - 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 - a TypeCode object
describing the concrete valuetype basemembers - an array containing the members of the value typepublic TypeCode create_recursive_tc(String id)
ORBTypeCode object 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 a BAD_TYPECODE exception.
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.
create_recursive_tc in class ORBid - the logical id of the referenced typepublic TypeCode create_value_box_tc(String id, String name, TypeCode boxed_type)
ORBTypeCode object for an IDL value box.create_value_box_tc in class ORBid - the logical id for the value typename - the name of the value typeboxed_type - the TypeCode for the typepublic Any create_any()
create_any in class ORBpublic void setTypeCodeForClass(Class c, TypeCodeImpl tci)
public TypeCodeImpl getTypeCodeForClass(Class c)
public String[] list_initial_services()
list_initial_services in class ORBpublic Object resolve_initial_references(String identifier) throws InvalidName
resolve_initial_references in class ORBidentifier - The stringified object reference of the
desired service.InvalidName - The supplied identifier is not associated
with a known service.SystemException - One of a fixed set of Corba system exceptions.public void register_initial_reference(String id, Object obj) throws InvalidName
"Y", and an
object, YY, then a subsequent call to
ORB.resolve_initial_references( "Y" ) will
return object YY.register_initial_reference in class ORBid - The ID by which the initial reference will be known.obj - The initial reference itself.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.BAD_PARAM - if the obj parameter is null.public void run()
public void shutdown(boolean wait_for_completion)
ORBwait_for_completion parameter
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, the BAD_INV_ORDER system exception
will be thrown with the OMG minor code 3,
since blocking would result in a deadlock.wait_for_completion parameter is FALSE,
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 destroy operation on the ORB itself.
Invoking any other operation will throw the BAD_INV_ORDER
system exception with the OMG minor code 4.
The ORB.run method will return after
shutdown has been called.
protected void shutdownServants(boolean wait_for_completion)
public void checkShutdownState()
checkShutdownState in class ORBpublic boolean isDuringDispatch()
isDuringDispatch in class ORBpublic void startingDispatch()
startingDispatch in class ORBpublic void finishedDispatch()
finishedDispatch in class ORBpublic void destroy()
public ValueFactory register_value_factory(String repositoryID, ValueFactory factory)
register_value_factory in class ORBrepositoryID - the repository ID.factory - the factory.BAD_PARAM - if the registration fails.public void unregister_value_factory(String repositoryID)
unregister_value_factory in class ORBrepositoryID - the repository ID.public ValueFactory lookup_value_factory(String repositoryID)
register_value_factory(java.lang.String, org.omg.CORBA.portable.ValueFactory) or is the default factory.lookup_value_factory in class ORBrepositoryID - the repository ID.BAD_PARAM - if unable to locate a factory.public OAInvocationInfo peekInvocationInfo()
peekInvocationInfo in class ORBpublic void pushInvocationInfo(OAInvocationInfo info)
pushInvocationInfo in class ORBpublic OAInvocationInfo popInvocationInfo()
popInvocationInfo in class ORBpublic void initBadServerIdHandler()
initBadServerIdHandler in class ORBpublic void setBadServerIdHandler(BadServerIdHandler handler)
setBadServerIdHandler in class ORBpublic void handleBadServerId(ObjectKey okey)
ORBhandleBadServerId in class ORBpublic Policy create_policy(int type, Any val) throws PolicyError
ORBcreate_policy in class ORBtype - 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 createdPolicyErrorpublic void connect(Object servant)
public void disconnect(Object obj)
ORBorg.omg.CORBA.OBJECT_NOT_EXIST back 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 disconnect has no effect
if the servant is not connected to the ORB.
Deprecated by the OMG in favor of the Portable Object Adapter APIs.
disconnect in class ORBobj - The servant object to be disconnected from the ORBpublic int getTransientServerId()
ORBgetTransientServerId in class ORBpublic RequestDispatcherRegistry getRequestDispatcherRegistry()
getRequestDispatcherRegistry in class ORBpublic ServiceContextRegistry getServiceContextRegistry()
getServiceContextRegistry in class ORBpublic boolean isLocalHost(String hostName)
isLocalHost in class ORBpublic boolean isLocalServerId(int subcontractId,
int serverId)
isLocalServerId in class ORBpublic boolean work_pending()
work_pending in class ORBtrue if there is work pending, meaning that the ORB
needs the main thread to perform some work; false
if there is no work pending and thus the ORB does not need the
main threadpublic void perform_work()
perform_work in class ORBpublic void set_delegate(Object servant)
set_delegate in class ORBCORBA_2_3 package
comments for unimplemented featurespublic ClientInvocationInfo createOrIncrementInvocationInfo()
public void releaseOrDecrementInvocationInfo()
public ClientInvocationInfo getInvocationInfo()
public void setClientDelegateFactory(ClientDelegateFactory factory)
setClientDelegateFactory in class ORBpublic ClientDelegateFactory getClientDelegateFactory()
getClientDelegateFactory in class ORBpublic void setCorbaContactInfoListFactory(CorbaContactInfoListFactory factory)
setCorbaContactInfoListFactory in class ORBpublic CorbaContactInfoListFactory getCorbaContactInfoListFactory()
getCorbaContactInfoListFactory in class ORBpublic void setResolver(Resolver resolver)
setResolver in class ORBpublic Resolver getResolver()
getResolver in class ORBpublic void setLocalResolver(LocalResolver resolver)
setLocalResolver in class ORBpublic LocalResolver getLocalResolver()
getLocalResolver in class ORBpublic void setURLOperation(Operation stringToObject)
setURLOperation in class ORBpublic Operation getURLOperation()
getURLOperation in class ORBpublic void setINSDelegate(CorbaServerRequestDispatcher sdel)
ORBsetINSDelegate in class ORBpublic TaggedComponentFactoryFinder getTaggedComponentFactoryFinder()
ORBgetTaggedComponentFactoryFinder in class ORBpublic IdentifiableFactoryFinder getTaggedProfileFactoryFinder()
getTaggedProfileFactoryFinder in class ORBpublic IdentifiableFactoryFinder getTaggedProfileTemplateFactoryFinder()
getTaggedProfileTemplateFactoryFinder in class ORBpublic ObjectKeyFactory getObjectKeyFactory()
getObjectKeyFactory in class ORBpublic void setObjectKeyFactory(ObjectKeyFactory factory)
setObjectKeyFactory in class ORBpublic TransportManager getTransportManager()
public CorbaTransportManager getCorbaTransportManager()
getCorbaTransportManager in class ORBpublic LegacyServerSocketManager getLegacyServerSocketManager()
getLegacyServerSocketManager in class ORBpublic void setThreadPoolManager(ThreadPoolManager mgr)
setThreadPoolManager in class ORBpublic ThreadPoolManager getThreadPoolManager()
getThreadPoolManager in class ORBpublic CopierManager getCopierManager()
getCopierManager in class ORBCopyright © 2018 JBoss by Red Hat. All rights reserved.