com.nokia.m2m.orb
Class ORB

java.lang.Object
  |
  +--org.omg.CORBA.ORB
        |
        +--com.nokia.m2m.orb.ORB

public final class ORB
extends org.omg.CORBA.ORB

The main ORB (Object Request Broker) class. Create and ORB instance using ORB.init(null,null);


Constructor Summary
ORB()
           
 
Method Summary
 void bindTransport(org.omg.CORBA.Object objref, int[] connIds)
          Binds the transport to one of the set-up bearers of the terminal.
 org.omg.CORBA.Environment create_environment()
          Not supported.
 org.omg.CORBA.portable.OutputStream create_output_stream()
          Creates a new OutputStream.
 org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps, String typeId)
          Creates an M2M Namedreference.
 org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps, String typeId, String gwIPAddress, int gwPorts)
           Creates a reference encapsulating the WIOP NamedReference profile and using the specified gateway address and port.
 org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps, String typeId, String gwIPAddress, int gwPort, org.omg.IOP.TaggedComponent[] taggedComponents)
          Creates a reference encapsulating the WIOP NamedReference profile and using the specified gateway address and port.
 org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps, String typeId, org.omg.IOP.TaggedComponent[] taggedComponents)
          Creates an M2M Namedreference .
 org.omg.CORBA.Object createReference(POA poa, byte[] objectKey, byte[] oid, String typeId, int bearer)
          This method is called by the POA when the user wants to publish one of its local objects.
 org.omg.CORBA.Object createReference(String ipAddress, int port, byte[] objectKey, String typeId, String iiopVersion)
          Proprietary method for creating an object reference.
 org.omg.CORBA.Object createReference(String ipAddress, int port, byte[] objectKey, String typeId, String iiopVersion, org.omg.IOP.TaggedComponent[] taggedComponents)
          Proprietary method for creating an object reference.
 void destroy()
          Destroys the ORB instance.
 org.omg.CORBA.Current get_current()
          Returns the current object.
 org.omg.PortableServer.POA getRootPOA()
          Returns the root POA
protected  TransportManager getTpManager()
           
protected  TransportManagerImpl getTpManagerImpl()
          Used by the request processor.
 String[] list_initial_services()
          Lists the initial services used by the ORB.
 String object_to_string(org.omg.CORBA.Object obj)
          Returns
 boolean poll_next_response()
          This method always returns false.
 org.omg.CORBA.Object resolve_initial_references(String objectName)
           
 void run()
          Blocks the call until the ORB is shut down.
 void set_delegate(Object wrapper)
           
protected  void set_parameters(String[] args, Hashtable props)
          Initializes the ORB.
 org.omg.CORBA.Object string_to_object(String str)
          Handles IOR strings and object URLs.
protected  boolean useCodesetServiceContexts()
          Returns true if the ORB uses CODE_SETS serviceContext in the GIOP messages it sends.
 
Methods inherited from class org.omg.CORBA.ORB
connect, create_abstract_interface_tc, create_alias_tc, create_any, create_array_tc, create_basic_dyn_any, create_context_list, create_dyn_any, create_dyn_array, create_dyn_enum, create_dyn_sequence, create_dyn_struct, create_dyn_union, create_enum_tc, create_exception_list, create_exception_tc, create_fixed_tc, create_interface_tc, create_list, create_named_value, create_native_tc, create_operation_list, create_policy, 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, disconnect, get_default_context, get_next_response, get_primitive_tc, get_service_information, init, init, init, perform_work, send_multiple_requests_deferred, send_multiple_requests_oneway, set_parameters, set_parameters, shutdown, work_pending
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ORB

public ORB()
Method Detail

get_current

public org.omg.CORBA.Current get_current()
Returns the current object.

Overrides:
get_current in class org.omg.CORBA.ORB
Returns:
The current object.

set_parameters

protected void set_parameters(String[] args,
                              Hashtable props)
Initializes the ORB. Throws BAD_PARAM if the configuration values are not valid.

See Also:
org.omg.CORBA.ORB#set_parameters(java.lang.String, java.util.Hashtable)

list_initial_services

public String[] list_initial_services()
Lists the initial services used by the ORB. Returns both hard-coded and user installed services.

Specified by:
list_initial_services in class org.omg.CORBA.ORB
See Also:
ORB.list_initial_services()

resolve_initial_references

public org.omg.CORBA.Object resolve_initial_references(String objectName)
                                                throws org.omg.CORBA.ORBPackage.InvalidName
Specified by:
resolve_initial_references in class org.omg.CORBA.ORB
org.omg.CORBA.ORBPackage.InvalidName
See Also:
ORB.resolve_initial_references(String)

getTpManager

protected TransportManager getTpManager()

getRootPOA

public org.omg.PortableServer.POA getRootPOA()
Returns the root POA

Returns:
org.omg.PortableServer.POA

object_to_string

public String object_to_string(org.omg.CORBA.Object obj)
Returns

Specified by:
object_to_string in class org.omg.CORBA.ORB
See Also:
ORB.object_to_string(org.omg.CORBA.Object)

string_to_object

public org.omg.CORBA.Object string_to_object(String str)
Handles IOR strings and object URLs.

Specified by:
string_to_object in class org.omg.CORBA.ORB
See Also:
ORB.string_to_object(java.lang.String)

create_environment

public org.omg.CORBA.Environment create_environment()
Not supported. This method raises NO_IMPLEMENT.

Specified by:
create_environment in class org.omg.CORBA.ORB
See Also:
ORB.create_environment()

create_output_stream

public org.omg.CORBA.portable.OutputStream create_output_stream()
Creates a new OutputStream.

Specified by:
create_output_stream in class org.omg.CORBA.ORB
See Also:
ORB.create_output_stream()

poll_next_response

public boolean poll_next_response()
This method always returns false.

Specified by:
poll_next_response in class org.omg.CORBA.ORB
See Also:
ORB.poll_next_response()

set_delegate

public void set_delegate(Object wrapper)

createReference

public org.omg.CORBA.Object createReference(String ipAddress,
                                            int port,
                                            byte[] objectKey,
                                            String typeId,
                                            String iiopVersion,
                                            org.omg.IOP.TaggedComponent[] taggedComponents)
Proprietary method for creating an object reference. Returns an IOR that has an IIOP profile created from the given arguments.

This method is used for remote references. You should only call this if you are creating a remote reference.

Parameters:
ipAddress - The Server's ORB address. This is not M2M gateway address.
port - Server ORB port.
objectKey - The Object key of the servant.
typeId - Repository identifier (type id) of the object
iiopVersion - 1.0, 1.1 or 1.2.
taggedComponents - Array of TaggedComponents. For example CodeSetComponent.
Returns:
org.omg.CORBA.Object The returned object can be narrowed to the desired type.

createReference

public org.omg.CORBA.Object createReference(String ipAddress,
                                            int port,
                                            byte[] objectKey,
                                            String typeId,
                                            String iiopVersion)
Proprietary method for creating an object reference. Returns an IOR that includes one IIOP profile created from the given arguments.

This method is used for remote references. You should only call this if you are creating a remote reference.

Parameters:
ipAddress - The server's ORB address. Hostname is not allowed. This is not an M2M gateway address.
port - Server ORB port.
objectKey - The object key of servant.
typeId - The Repository identifier (type id) of object.
iiopVersion - Version 1.0, 1.1 or 1.2.
Returns:
org.omg.CORBA.Object The returned object can be narrowed to the desired type

createReference

public org.omg.CORBA.Object createReference(POA poa,
                                            byte[] objectKey,
                                            byte[] oid,
                                            String typeId,
                                            int bearer)
This method is called by the POA when the user wants to publish one of its local objects. Creates a reference from the local object. The user should not use this method directly.

Parameters:
poa - POA to which the object is currently bound.
objectKey - The object key of the object.
typeId - Type ID used in the IOR.
Returns:
Object

createNamedReference

public org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps,
                                                 String typeId)
Creates an M2M Namedreference.

This method uses the default M2M gateway that is selected when the user binds a bearer. Any reference created this way must later be bound to a transport that has been set a gateway address. If the reference is not bound to any transport when the method call is created, the default transport will be used.

Parameters:
nameComps -
typeId -
Returns:
Object

createNamedReference

public org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps,
                                                 String typeId,
                                                 org.omg.IOP.TaggedComponent[] taggedComponents)
Creates an M2M Namedreference .

This method uses the default M2M gateway that is selected when the user binds a bearer. Any reference created this way must later be bound to a transport that has been set a gateway address.

Parameters:
nameComps -
typeId -
taggedComponents -
Returns:
Object

createNamedReference

public org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps,
                                                 String typeId,
                                                 String gwIPAddress,
                                                 int gwPorts)

Creates a reference encapsulating the WIOP NamedReference profile and using the specified gateway address and port. When the reference is created with this method, the ORB uses the given gateway address and does not resolve the gateway address from the terminal configuration.

This method can be used only when the ORB is running in the M2M mode.

Parameters:
nameComps -
typeId -
gwIPAddress -
Returns:
Object

createNamedReference

public org.omg.CORBA.Object createNamedReference(org.omg.CosNaming.NameComponent[] nameComps,
                                                 String typeId,
                                                 String gwIPAddress,
                                                 int gwPort,
                                                 org.omg.IOP.TaggedComponent[] taggedComponents)
Creates a reference encapsulating the WIOP NamedReference profile and using the specified gateway address and port. This method can only be used when the ORB is running in the M2M mode.

Parameters:
nameComps -
typeId -
gwIPAddress - Null if default used
gwPort - 0 if default used
taggedComponents - TaggedComponent
Returns:
Object

bindTransport

public void bindTransport(org.omg.CORBA.Object objref,
                          int[] connIds)
Binds the transport to one of the set-up bearers of the terminal. If the terminal cannot open the link using the bearer specified in the first connection ID, the ORB selects and tries the next one automatically.

Parameters:
objref -
connIds -

getTpManagerImpl

protected TransportManagerImpl getTpManagerImpl()
Used by the request processor.

Returns:
TransportManagerImpl

destroy

public void destroy()
Destroys the ORB instance.

Overrides:
destroy in class org.omg.CORBA.ORB
See Also:
ORB.destroy()

run

public void run()
Blocks the call until the ORB is shut down. This method does not actually run the ORB, but it blocks the call so that the program does not exit main(). Calling this method is optional and does not affect ORB functionality.

Overrides:
run in class org.omg.CORBA.ORB
See Also:
ORB.run()

useCodesetServiceContexts

protected boolean useCodesetServiceContexts()
Returns true if the ORB uses CODE_SETS serviceContext in the GIOP messages it sends. The CodeSet component is enabled by default, but it can be disabled by configuring a value.

Returns:
boolean


Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.

Portions of this document are under the following copyright:
Copyright © 2003 Nokia. All rights reserved.