org.objectweb.david.libs.binding.orbs.iiop
Class ORBImpl

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
                  extended byorg.objectweb.david.libs.binding.orbs.iiop.ORBImpl
All Implemented Interfaces:
Constants, DavidMarshallerFactory, org.objectweb.david.apis.binding.orbs.JacorbORB, JAVA_SERIAL_SERVICE, NamingContext

public class ORBImpl
extends ORBClass
implements NamingContext, org.objectweb.david.apis.binding.orbs.JacorbORB, JAVA_SERIAL_SERVICE

Encapsulates a IIOPBinder instance under a CORBA compliant interface, by extending ORBClass.


Field Summary
 
Fields inherited from class org.objectweb.david.libs.binding.orbs.ORBClass
domain, initial_services_context, marshaller_factory, stub_factory
 
Fields inherited from interface org.objectweb.david.apis.services.java_serial.JAVA_SERIAL_SERVICE
TAG_JAVA_SERIAL
 
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
ORBImpl()
          Constructs a new instance of ORBImpl.
 
Method Summary
 Identifier decode(byte[] data, int offset, int length)
          Decodes an identifier from a buffer portion.
 Identifier decode(UnMarshaller u)
          Calls the decode method on the underlying IIOPBinder instance.
 Identifier export(java.lang.Object id, org.objectweb.jonathan.apis.kernel.Context hints)
          Creates a new identifier for the object interface designated by the id parameter.
 org.objectweb.david.libs.binding.poa.jacorb_poa.Current getPOACurrent()
           
 org.omg.CORBA.Object getReference(org.objectweb.david.libs.binding.poa.jacorb_poa.POA poa, byte[] object_key, java.lang.String rep_id, boolean _transient)
          Returns the reference corresponding to a specified object_key.
 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 set_delegate(java.lang.Object wrapper)
          Creation of a ServantDelegate for the specified object and to this ORBImpl.
 void setBinder(IIOPBinder binder)
           
 void setServantDelegateFactory(org.objectweb.david.apis.binding.portable_server.ServantDelegateFactory sdfactory)
           
 
Methods inherited from class org.objectweb.david.libs.binding.orbs.ORBClass
connect, create_any, create_output_stream, disconnect, get_next_response, list_initial_services, newMarshaller, newUnMarshaller, object_to_string, perform_work, poll_next_response, run, send_multiple_requests_deferred, send_multiple_requests_oneway, setDomain, setInitialServicesContext, setMarshallerFactory, setStubFactory, shutdown, string_to_object, work_pending
 
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, 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
 

Constructor Detail

ORBImpl

public ORBImpl()
Constructs a new instance of ORBImpl.

This method should not be called directly by an application: It is here only to let ORBImpl be instanciated when one of the org.omg.CORBA.ORB.init(...) methods is called.

Method Detail

setBinder

public void setBinder(IIOPBinder binder)

setServantDelegateFactory

public void setServantDelegateFactory(org.objectweb.david.apis.binding.portable_server.ServantDelegateFactory sdfactory)

export

public Identifier export(java.lang.Object id,
                         org.objectweb.jonathan.apis.kernel.Context hints)
                  throws org.objectweb.jonathan.apis.kernel.JonathanException
Creates a new identifier for the object interface designated by the id parameter. id must be of type Identifier.

Calls the export method on the underlying IIOPBinder instance.

Specified by:
export in interface NamingContext
Parameters:
id - an identifier managed by another naming context (probably an adapter);
hints - additional information;
Returns:
an identifier managed by ORBImpl.
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something else goes wrong.
See Also:
naming_context.export(org.objectweb.jonathan.model.name)

decode

public Identifier decode(byte[] data,
                         int offset,
                         int length)
                  throws org.objectweb.jonathan.apis.kernel.JonathanException
Decodes an identifier from a buffer portion.

Calls the decode method on the underlying IIOPBinder instance.

Specified by:
decode in interface NamingContext
Parameters:
data - the byte array to read the encoded identifier from;
offset - offset of the first byte of the encoding;
length - length of the encoding;
Returns:
a decoded identifier;
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something goes wrong.

decode

public Identifier decode(UnMarshaller u)
                  throws org.objectweb.jonathan.apis.kernel.JonathanException
Calls the decode method on the underlying IIOPBinder instance.

Specified by:
decode in interface NamingContext
Parameters:
u - an unmarhaller;
Returns:
an identifier managed by the target naming context;
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something goes wrong.

getPOACurrent

public org.objectweb.david.libs.binding.poa.jacorb_poa.Current getPOACurrent()
Specified by:
getPOACurrent in interface org.objectweb.david.apis.binding.orbs.JacorbORB
Returns:
the current used POA associated with that ORBImpl.

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.

Specified by:
resolve_initial_references in interface org.objectweb.david.apis.binding.orbs.JacorbORB
Overrides:
resolve_initial_references in class ORBClass
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.

set_delegate

public void set_delegate(java.lang.Object wrapper)
Creation of a ServantDelegate for the specified object and to this ORBImpl.

Specified by:
set_delegate in interface org.objectweb.david.apis.binding.orbs.JacorbORB
Parameters:
wrapper - the object for which we want a delegate

getReference

public org.omg.CORBA.Object getReference(org.objectweb.david.libs.binding.poa.jacorb_poa.POA poa,
                                         byte[] object_key,
                                         java.lang.String rep_id,
                                         boolean _transient)
Returns the reference corresponding to a specified object_key.

Specified by:
getReference in interface org.objectweb.david.apis.binding.orbs.JacorbORB
Parameters:
poa - : not needed : the method works on the root poa
object_key - : the associated object_key
rep_id - : the identifier of the idl interface
_transient - : not needed here : this parameter is not interpreted
Returns:
the wanted reference.