org.jacorb.orb

Class ORB

public final class ORB extends ORBSingleton implements POAListener, Configurable

Version: $Id: ORB.java,v 1.172 2007/02/14 09:55:24 andre.spiegel Exp $

Author: Gerald Brose, FU Berlin

Field Summary
static Stringorb_id
String[]_args
command like args
Constructor Summary
ORB()
Method Summary
voidaddObjectKey(String key_name, String full_path)
addObjectKey is a proprietary method that allows the internal objectKeyMap to be altered programmatically.
voidaddRequest(Request req)
voidconfigure(Configuration config)
configure the ORB
voidconnect(Object obj)
ProtocolAddressBasecreateAddress(String address)
ContextListcreate_context_list()
Environmentcreate_environment()
ExceptionListcreate_exception_list()
NVListcreate_list(int count)
NamedValuecreate_named_value(String name, Any value, int flags)
NVListcreate_operation_list(Object obj)
NVListcreate_operation_list(OperationDef oper)
OutputStreamcreate_output_stream()
Policycreate_policy(int type, Any value)
This method creates a policy with the given type and the given value.
voiddestroy()
voiddisconnect(Object obj)
BasicAdaptergetBasicAdapter()
used from the POA
BoxedValueHelpergetBoxedValueHelper(String repId)
Returns a BoxedValueHelper for the type specified by repId, or null if no such BoxedValueHelper can be found.
ClientConnectionManagergetClientConnectionManager()
ConfigurationgetConfiguration()
Some parts of JacORB cannot be elegantly configured from the outside and need access to the ORB's configuration retrieve config settings.
GIOPConnectionManagergetGIOPConnectionManager()
StringgetImplName()
InterceptorManagergetInterceptorManager()
Get the InterceptorManager, if present.
CurrentgetPOACurrent()
getPOACurrent
ObjectgetReference(POA poa, byte[] object_key, String rep_id, boolean _transient)
called by POA to create an IOR
POAgetRootPOA()
byte[]getServerId()
StringgetServerIdString()
TransportManagergetTransportManager()
Contextget_default_context()
Requestget_next_response()
booleanget_service_information(short service_type, ServiceInformationHolder service_information)
Objectget_value_def(String repid)
always return a ValueDef or throw BAD_PARAM if not repid of a value
booleanhasClientRequestInterceptors()
Test, if the ORB has ClientRequestInterceptors
Called by Delegate.
booleanhasPolicyFactoryForType(int type)
Tests if a policy factory is present for the given type.
booleanhasRequestInterceptors()
Test, if the ORB has client or server side interceptors.
booleanhasServerRequestInterceptors()
Test, if the ORB has ServerRequestInterceptors
Called by poa.RequestProcessor.
Stringid()
Overrides id() in org.omg.CORBA_2_5.ORB
String[]list_initial_services()
ValueFactorylookup_value_factory(String id)
byte[]mapObjectKey(byte[] originalKey)
Map an object key to another, as defined by the value of a corresponding configuration property in the properties file, e.g. map "NameService" to "StandardNS/NameServer-POA/_root"
RPPoolManagernewRPPoolManager(boolean isSingleThreaded)
voidnotifyTransportListeners(GIOPConnection gc)
Stringobject_to_string(Object obj)
voidperform_work()
voidpoaCreated(POA poa)
An operation from the POAListener interface.
voidpoaStateChanged(POA poa, int new_state)
booleanpoll_next_response()
voidreferenceCreated(Object o)
voidregister_initial_reference(String id, Object obj)
Register a reference, that will be returned on subsequent calls to resove_initial_references(id).
ValueFactoryregister_value_factory(String id, ValueFactory factory)
voidremoveRequest(Request req)
Objectresolve_initial_references(String identifier)
resolve_initial_references
voidrun()
voidsend_multiple_requests_deferred(Request[] req)
voidsend_multiple_requests_oneway(Request[] req)
voidset_delegate(Object wrapper)
called by org.jacorb.poa.RequestProcessor
protected voidset_parameters(String[] args, Properties props)
called from ORB.init(), entry point for initialization.
protected voidset_parameters(Applet app, Properties props)
Initialization method, called from within the super class org.omg.CORBA.ORB
voidshutdown(boolean wait_for_completion)
Objectstring_to_object(String str)
voidturnOnBiDirGIOP()
voidunregister_value_factory(String id)
booleanuseBiDirGIOP()
booleanwork_pending()
Object_getObject(ParsedIOR pior)
This version of _getObject is used for references that have arrived over the network and is called from CDRInputStream.

Field Detail

orb_id

public static final String orb_id

_args

public String[] _args
command like args

Constructor Detail

ORB

public ORB()

Method Detail

addObjectKey

public void addObjectKey(String key_name, String full_path)
addObjectKey is a proprietary method that allows the internal objectKeyMap to be altered programmatically. The objectKeyMap allows more readable corbaloc URLs by mapping the actual object key to an arbitary string. See the jacorb.properties file for more information.

Parameters: key_name a String value e.g. NameService full_path an String value e.g. file:/home/rnc/NameSingleton.ior

addRequest

public void addRequest(Request req)

configure

public void configure(Configuration config)
configure the ORB

connect

public void connect(Object obj)

createAddress

public ProtocolAddressBase createAddress(String address)

create_context_list

public ContextList create_context_list()

create_environment

public Environment create_environment()

create_exception_list

public ExceptionList create_exception_list()

create_list

public NVList create_list(int count)

create_named_value

public NamedValue create_named_value(String name, Any value, int flags)

create_operation_list

public NVList create_operation_list(Object obj)

create_operation_list

public NVList create_operation_list(OperationDef oper)

Deprecated: use create_operation_list instead

create_output_stream

public OutputStream create_output_stream()

create_policy

public Policy create_policy(int type, Any value)
This method creates a policy with the given type and the given value.

Parameters: type The policies type. value The policies value.

Throws: org.omg.CORBA.PolicyError There is no PolicyFactory for the given type or the policy creation failed.

See Also: org.omg.PortableInterceptor.PolicyFactory

destroy

public void destroy()

disconnect

public void disconnect(Object obj)

getBasicAdapter

public BasicAdapter getBasicAdapter()
used from the POA

Returns: the basic adapter used by this ORB instance

getBoxedValueHelper

public BoxedValueHelper getBoxedValueHelper(String repId)
Returns a BoxedValueHelper for the type specified by repId, or null if no such BoxedValueHelper can be found. This method uses an internal cache of BoxedValueHelpers so that each class needs only be looked up once.

Parameters: repId the repository id of the type for which a BoxedValueHelper should be returned. It is assumed that repId is the repository id of a boxed value type. Otherwise, the result will be null.

Returns: an instance of the BoxedValueHelper class that corresponds to repId.

getClientConnectionManager

public ClientConnectionManager getClientConnectionManager()

getConfiguration

public Configuration getConfiguration()
Some parts of JacORB cannot be elegantly configured from the outside and need access to the ORB's configuration retrieve config settings. This method should only be used in those restricted cases!

getGIOPConnectionManager

public GIOPConnectionManager getGIOPConnectionManager()

getImplName

public String getImplName()

getInterceptorManager

public InterceptorManager getInterceptorManager()
Get the InterceptorManager, if present.

Returns: the InterceptorManager, or null, if none is present.

getPOACurrent

public Current getPOACurrent()
getPOACurrent

getReference

public Object getReference(POA poa, byte[] object_key, String rep_id, boolean _transient)
called by POA to create an IOR

Parameters: poa the calling POA object_key rep_id _transient is the new reference transient or persistent

Returns: a new CORBA Object reference

getRootPOA

public POA getRootPOA()

getServerId

public byte[] getServerId()

getServerIdString

public String getServerIdString()

getTransportManager

public TransportManager getTransportManager()

get_default_context

public Context get_default_context()

get_next_response

public Request get_next_response()

get_service_information

public boolean get_service_information(short service_type, ServiceInformationHolder service_information)

get_value_def

public Object get_value_def(String repid)
always return a ValueDef or throw BAD_PARAM if not repid of a value

hasClientRequestInterceptors

public boolean hasClientRequestInterceptors()
Test, if the ORB has ClientRequestInterceptors
Called by Delegate.

hasPolicyFactoryForType

public boolean hasPolicyFactoryForType(int type)
Tests if a policy factory is present for the given type.

hasRequestInterceptors

public boolean hasRequestInterceptors()
Test, if the ORB has client or server side interceptors.

hasServerRequestInterceptors

public boolean hasServerRequestInterceptors()
Test, if the ORB has ServerRequestInterceptors
Called by poa.RequestProcessor.

id

public String id()
Overrides id() in org.omg.CORBA_2_5.ORB

list_initial_services

public String[] list_initial_services()

lookup_value_factory

public ValueFactory lookup_value_factory(String id)

mapObjectKey

public byte[] mapObjectKey(byte[] originalKey)
Map an object key to another, as defined by the value of a corresponding configuration property in the properties file, e.g. map "NameService" to "StandardNS/NameServer-POA/_root"

Parameters: originalKey a byte[] value containing the original key.

Returns: a byte[] value containing the mapped key, if a mapping is defined, originalKey otherwise.

newRPPoolManager

public RPPoolManager newRPPoolManager(boolean isSingleThreaded)

notifyTransportListeners

public void notifyTransportListeners(GIOPConnection gc)

object_to_string

public String object_to_string(Object obj)

perform_work

public void perform_work()

poaCreated

public void poaCreated(POA poa)
An operation from the POAListener interface. Whenever a new POA is created, the ORB is notified.

poaStateChanged

public void poaStateChanged(POA poa, int new_state)

poll_next_response

public boolean poll_next_response()

referenceCreated

public void referenceCreated(Object o)

register_initial_reference

public void register_initial_reference(String id, Object obj)
Register a reference, that will be returned on subsequent calls to resove_initial_references(id).
The references "RootPOA", "POACurrent" and "PICurrent" can be set, but will not be resolved with the passed in references.

Overrides register_initial_reference() in org.omg.CORBA_2_5.ORB

Parameters: id The references human-readable id, e.g. "MyService". obj The objects reference.

Throws: InvalidName A reference with id has already been registered.

register_value_factory

public ValueFactory register_value_factory(String id, ValueFactory factory)

removeRequest

public void removeRequest(Request req)

resolve_initial_references

public Object resolve_initial_references(String identifier)
resolve_initial_references

run

public void run()

send_multiple_requests_deferred

public void send_multiple_requests_deferred(Request[] req)

send_multiple_requests_oneway

public void send_multiple_requests_oneway(Request[] req)

set_delegate

public void set_delegate(Object wrapper)
called by org.jacorb.poa.RequestProcessor

set_parameters

protected void set_parameters(String[] args, Properties props)
called from ORB.init(), entry point for initialization.

set_parameters

protected void set_parameters(Applet app, Properties props)
Initialization method, called from within the super class org.omg.CORBA.ORB

shutdown

public void shutdown(boolean wait_for_completion)

string_to_object

public Object string_to_object(String str)

turnOnBiDirGIOP

public void turnOnBiDirGIOP()

unregister_value_factory

public void unregister_value_factory(String id)

useBiDirGIOP

public boolean useBiDirGIOP()

work_pending

public boolean work_pending()

_getObject

public Object _getObject(ParsedIOR pior)
This version of _getObject is used for references that have arrived over the network and is called from CDRInputStream. It removes stale cache entries