org.objectweb.david.libs.binding.orbs
Class ORBClass

java.lang.Object
  extended byorg.omg.CORBA.ORB
      extended byorg.omg.CORBA_2_3.ORB
          extended byorg.objectweb.david.libs.binding.orbs.ORBSingletonClass
              extended byorg.objectweb.david.libs.binding.orbs.ORBClass
All Implemented Interfaces:
Constants, DavidMarshallerFactory
Direct Known Subclasses:
EventChannelFactory, ORBImpl

public abstract class ORBClass
extends ORBSingletonClass
implements DavidMarshallerFactory

This class is an extension of the standard CORBA ORB class, implementing the protocol independent features of a CORBA ORB.


Field Summary
protected  NamingContext domain
           
protected  org.objectweb.jonathan.apis.kernel.Context initial_services_context
           
protected  DavidStreamFactory marshaller_factory
           
protected  StubFactory stub_factory
           
 
Fields inherited from interface org.objectweb.david.libs.binding.orbs.Constants
corba_object_id, corba_prefix, TC_any, TC_boolean, TC_char, TC_double, TC_float, TC_long, TC_longdouble, TC_longlong, TC_null, TC_Object, TC_octet, TC_Principal, TC_short, TC_string, tc_table, TC_TypeCode, TC_ulong, TC_ulonglong, TC_ushort, TC_void, TC_wchar, TC_wstring
 
Constructor Summary
protected ORBClass()
           
 
Method Summary
 void connect(org.omg.CORBA.Object obj)
          Exports the provided object to a default adapter of type SimpleAdapter.
 org.omg.CORBA.Any create_any()
           
 org.omg.CORBA.portable.OutputStream create_output_stream()
          Create a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.
 void disconnect(org.omg.CORBA.Object obj)
          Unexports the provided object.
 org.omg.CORBA.Request get_next_response()
          Get the next request instance for which a response has been received.
 java.lang.String[] list_initial_services()
          Return a list of the initially available CORBA object references, such as the NameService and InterfaceRepository.
 DavidMarshaller newMarshaller()
          Returns a new marshaller.
 DavidUnMarshaller newUnMarshaller()
          Returns a new unmarshaller.
 java.lang.String object_to_string(org.omg.CORBA.Object object)
          Returns a stringified IOR corresponding to the specified CORBA Object.
 void perform_work()
          This operation does nothing.
 boolean poll_next_response()
          Find out if any of the deferred (asynchronous) invocations have a response yet.
 org.omg.CORBA.Object resolve_initial_references(java.lang.String name)
          Resolve a specific object reference from the set of available initial service names.
 void run()
          This operation blocks the calling thread until shutdown() is called.
 void send_multiple_requests_deferred(org.omg.CORBA.Request[] requests)
          Send multiple dynamic (DII) requests asynchronously.
 void send_multiple_requests_oneway(org.omg.CORBA.Request[] requests)
          Send multiple dynamic (DII) requests asynchronously without expecting any responses.
 void setDomain(NamingContext domain)
           
 void setInitialServicesContext(org.objectweb.jonathan.apis.kernel.Context initial_services_context)
           
 void setMarshallerFactory(DavidStreamFactory marshaller_factory)
           
 void setStubFactory(StubFactory stub_factory)
           
 void shutdown(boolean wait_for_completion)
          This operation instructs the ORB to shut down.
 org.omg.CORBA.Object string_to_object(java.lang.String ior)
          Returns a CORBA Object correponding to the specified IOR.
 boolean work_pending()
          This operation always returns false.
 
Methods inherited from class org.objectweb.david.libs.binding.orbs.ORBSingletonClass
create_alias_tc, create_array_tc, create_context_list, create_enum_tc, create_environment, create_exception_list, create_exception_tc, create_interface_tc, create_list, create_named_value, create_operation_list, create_recursive_sequence_tc, create_recursive_tc, create_sequence_tc, create_string_tc, create_struct_tc, create_union_tc, create_value_box_tc, create_value_tc, create_wstring_tc, get_default_context, get_primitive_tc, set_parameters, set_parameters, setDefault
 
Methods inherited from class org.omg.CORBA_2_3.ORB
get_value_def, lookup_value_factory, register_value_factory, set_delegate, unregister_value_factory
 
Methods inherited from class org.omg.CORBA.ORB
create_abstract_interface_tc, create_fixed_tc, create_native_tc, create_operation_list, create_policy, get_current, get_service_information, init, init, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initial_services_context

protected org.objectweb.jonathan.apis.kernel.Context initial_services_context

stub_factory

protected StubFactory stub_factory

domain

protected NamingContext domain

marshaller_factory

protected DavidStreamFactory marshaller_factory
Constructor Detail

ORBClass

protected ORBClass()
Method Detail

setStubFactory

public void setStubFactory(StubFactory stub_factory)

setDomain

public void setDomain(NamingContext domain)

setMarshallerFactory

public void setMarshallerFactory(DavidStreamFactory marshaller_factory)

setInitialServicesContext

public void setInitialServicesContext(org.objectweb.jonathan.apis.kernel.Context initial_services_context)

run

public void run()
This operation blocks the calling thread until shutdown() is called.


shutdown

public void shutdown(boolean wait_for_completion)
This operation instructs the ORB to shut down. The ORB.run() method will return after shutdown has been called.


work_pending

public boolean work_pending()
This operation always returns false.


perform_work

public void perform_work()
This operation does nothing.


list_initial_services

public java.lang.String[] list_initial_services()
Return a list of the initially available CORBA object references, such as the NameService and InterfaceRepository.

Overrides:
list_initial_services in class ORBSingletonClass
Returns:
the list of object service names

resolve_initial_references

public org.omg.CORBA.Object resolve_initial_references(java.lang.String name)
                                                throws org.omg.CORBA.ORBPackage.InvalidName
Resolve a specific object reference from the set of available initial service names.

Overrides:
resolve_initial_references in class ORBSingletonClass
Parameters:
name - the name of the initial service
Returns:
An object reference for the named object.
Throws:
org.omg.CORBA.ORBPackage.InvalidName - The given name is not associated with a known service.

object_to_string

public java.lang.String object_to_string(org.omg.CORBA.Object object)
Returns a stringified IOR corresponding to the specified CORBA Object.

Overrides:
object_to_string in class ORBSingletonClass
Parameters:
object - a CORBA object.
Returns:
a stringified IOR corresponding to 'object'.

string_to_object

public org.omg.CORBA.Object string_to_object(java.lang.String ior)
Returns a CORBA Object correponding to the specified IOR.

Overrides:
string_to_object in class ORBSingletonClass
Parameters:
ior - a stringified IOR.
Returns:
a CORBA Object correponding to 'ior'.

create_output_stream

public org.omg.CORBA.portable.OutputStream create_output_stream()
Create a new org.omg.CORBA.portable.OutputStream into which IDL method parameters can be marshalled during method invocation.

Overrides:
create_output_stream in class ORBSingletonClass

send_multiple_requests_oneway

public void send_multiple_requests_oneway(org.omg.CORBA.Request[] requests)
Send multiple dynamic (DII) requests asynchronously without expecting any responses.

Overrides:
send_multiple_requests_oneway in class ORBSingletonClass

send_multiple_requests_deferred

public void send_multiple_requests_deferred(org.omg.CORBA.Request[] requests)
Send multiple dynamic (DII) requests asynchronously.

Overrides:
send_multiple_requests_deferred in class ORBSingletonClass
Parameters:
requests - an array of request objects.

poll_next_response

public boolean poll_next_response()
Find out if any of the deferred (asynchronous) invocations have a response yet.

Overrides:
poll_next_response in class ORBSingletonClass

get_next_response

public org.omg.CORBA.Request get_next_response()
Get the next request instance for which a response has been received.

Overrides:
get_next_response in class ORBSingletonClass

create_any

public org.omg.CORBA.Any create_any()
Overrides:
create_any in class ORBSingletonClass

connect

public void connect(org.omg.CORBA.Object obj)
Exports the provided object to a default adapter of type SimpleAdapter.

The default adapter must be specified under the property "/david/orbs/initial_services/Connecter".

Overrides:
connect in class ORBSingletonClass
Parameters:
obj - a CORBA object reference.

disconnect

public void disconnect(org.omg.CORBA.Object obj)
Unexports the provided object.

This operation throws a BAD_OPERATION exception if the provided object cannot have been connected by the target ORB.

Overrides:
disconnect in class ORBSingletonClass
Parameters:
obj - a CORBA object reference.

newMarshaller

public DavidMarshaller newMarshaller()
Description copied from interface: DavidMarshallerFactory
Returns a new marshaller.

Specified by:
newMarshaller in interface DavidMarshallerFactory
Returns:
a new marshaller.

newUnMarshaller

public DavidUnMarshaller newUnMarshaller()
Description copied from interface: DavidMarshallerFactory
Returns a new unmarshaller.

Specified by:
newUnMarshaller in interface DavidMarshallerFactory
Returns:
a new unmarshaller.