com.sas.net.brg.orb
Class BrgOrb

com.sas.net.brg.orb.BrgOrb

public class BrgOrb

This is the root class of JavaBridge, a standard, non-interoperable CORBA ORB. It is standard because it implements the CORBA ORB specification (more specifically, it extends org.omg.CORBA.ORB), but it is not interoperable because it can only communicate with an IOM BRIDGE server. The benefit of communicating with the IOM BRIDGE server through a standard CORBA ORB is that it will support programs written to communicate with an IOM CORBA server through an interoperable CORBA ORB without modification or even recompilation.

To indicate to one of the org.omg.CORBA.ORB.init() method that you would like to use this ORB specify the following properties in the java.util.Properties object required by those methods.

Name Value
org.omg.CORBA.ORBClass com.sas.net.brg.orb.BrgOrb
org.omg.CORBA.ORBSingletonClass com.sas.net.omgidl.orb.ORB

It is also possible to instantiate this ORB directly using its constructor.

JavaBridge supports a variety of encryption algoritms for encrypting messages sent to and received from the IOM BRIDGE server. If encryption is used, then the authentication message which contains a user name and password will be encrypted. More information about control of encryption options is available at the string_to_object method. The following algorithms are supported.

sasproprietary
a stream cipher developed at SAS Institute.
rc2
a block cipher developed by RSA Data Security
rc4
a stream cipher developed by RSA Data Security
des
a block cipher called Data Encryption Standard
tripledes
des applied three times with separate keys
Support for rc2, rc4, des, and tripledes is only available if SAS/SECURE has been licensed on the IOM BRIDGE server and if the Java component of SAS/SECURE (sasecjav.zip) has been installed in the client code base. Furthermore, tripledes is generally only available in the United States and Canada due to U.S. Government export restrictions.


Constructor Summary
BrgOrb()
           
BrgOrb(java.util.Properties properties)
           
 
Method Summary
 void addEngine(com.sas.net.brg.orb.ProtocolEngineInterface engine)
           
 org.omg.CORBA.TypeCode create_alias_tc(java.lang.String id, java.lang.String name, org.omg.CORBA.TypeCode original_type)
          Create a TypeCode object representing another TypeCode object.
 org.omg.CORBA.Any create_any()
          Create an Any object.
 org.omg.CORBA.TypeCode create_array_tc(int length, org.omg.CORBA.TypeCode element_type)
          Create a TypeCode object representing an array.
 org.omg.CORBA.ContextList create_context_list()
          Create a list of Context objects.
 org.omg.CORBA.TypeCode create_enum_tc(java.lang.String id, java.lang.String name, java.lang.String[] members)
          Create a TypeCode object representing an enum.
 org.omg.CORBA.Environment create_environment()
          Creates an environment which holds the exception raised by an operation invocation.
 org.omg.CORBA.ExceptionList create_exception_list()
          Create a list of exceptions raised by an operation.
 org.omg.CORBA.TypeCode create_exception_tc(java.lang.String id, java.lang.String name, org.omg.CORBA.StructMember[] members)
          Create a TypeCode object representing an exception.
 org.omg.CORBA.TypeCode create_interface_tc(java.lang.String id, java.lang.String name)
          Create a TypeCode object representing an interface.
 org.omg.CORBA.NVList create_list(int count)
          Create a name/value pair list.
 org.omg.CORBA.NamedValue create_named_value(java.lang.String s, org.omg.CORBA.Any any, int flags)
          Create a name/value pair.
 org.omg.CORBA.portable.OutputStream create_output_stream()
          Create a stream for serializing parameters.
 org.omg.CORBA.TypeCode create_recursive_sequence_tc(int bound, int offset)
          Deprecated.  
 org.omg.CORBA.TypeCode create_sequence_tc(int bound, org.omg.CORBA.TypeCode element_type)
          Create a TypeCode object representing a sequence.
 org.omg.CORBA.TypeCode create_string_tc(int bound)
          Create a TypeCode object representing a string.
 org.omg.CORBA.TypeCode create_struct_tc(java.lang.String id, java.lang.String name, org.omg.CORBA.StructMember[] members)
          Create a TypeCode object representing a struct.
 org.omg.CORBA.TypeCode create_union_tc(java.lang.String id, java.lang.String name, org.omg.CORBA.TypeCode discriminator_type, org.omg.CORBA.UnionMember[] members)
          Create a TypeCode object representing a union.
 org.omg.CORBA.TypeCode create_wstring_tc(int bound)
          Create a TypeCode object representing a wide string.
 org.omg.CORBA.Current get_current()
          Deprecated.  
 org.omg.CORBA.Context get_default_context()
          Create a Context object.
 org.omg.CORBA.Request get_next_response()
          Throws NO_IMPLEMENT.
 org.omg.CORBA.TypeCode get_primitive_tc(org.omg.CORBA.TCKind tcKind)
          Get the TypeCode object representing a particular primitive type.
 java.util.Map getActiveObjectMap()
           
 com.sas.net.brg.orb.ActiveObjectMapKey getActiveObjectMapKey()
           
 com.sas.net.brg.orb.DelegateBase getDelegateBase()
           
 com.sas.net.brg.orb.GenericObject getGenericObject()
           
 int getNextClientID()
           
 java.lang.String[] list_initial_services()
           
 java.lang.String object_to_string(org.omg.CORBA.Object obj)
           
 boolean poll_next_response()
          Throws NO_IMPLEMENT.
 org.omg.CORBA.Object resolve_initial_references(java.lang.String name)
           
 void returnActiveObjectMapKey(com.sas.net.brg.orb.ActiveObjectMapKey activeObjectMapKey)
           
 void returnDelegateBase(com.sas.net.brg.orb.DelegateBase delegateBase)
           
 void returnGenericObject(com.sas.net.brg.orb.GenericObject obj)
           
 void send_multiple_requests_deferred(org.omg.CORBA.Request[] req)
          Throws NO_IMPLEMENT.
 void send_multiple_requests_oneway(org.omg.CORBA.Request[] req)
          Throws NO_IMPLEMENT.
 void shutdown(boolean waitForCompletion)
           
 org.omg.CORBA.Object string_to_object(java.lang.String url)
          This method causes the server to instantiate an object and sets up a remote reference to it on the client.
 

Constructor Detail

BrgOrb

public BrgOrb()

BrgOrb

public BrgOrb(java.util.Properties properties)
Method Detail

shutdown

public void shutdown(boolean waitForCompletion)

list_initial_services

public java.lang.String[] list_initial_services()

resolve_initial_references

public org.omg.CORBA.Object resolve_initial_references(java.lang.String name)
                                                throws org.omg.CORBA.ORBPackage.InvalidName

object_to_string

public java.lang.String object_to_string(org.omg.CORBA.Object obj)

string_to_object

public org.omg.CORBA.Object string_to_object(java.lang.String url)
This method causes the server to instantiate an object and sets up a remote reference to it on the client. If object instantiation fails, then this method returns null, and a reason will be printed in stderr.

The identity and location of the desired object are specified in a specially formatted URL.

bridge://host:port/classId?userName=user_name&password=password&otherNames=otherValues

host
the IP name or address of the machine running an IOM BRIDGE server or spawner.
port
the TCP port that the IOM BRIDGE server or spawner is listening to.
classId
the UUID for the class you want to instantiate. The UUID for the SASAutomation class is 440196D4-90F0-11D0-9F41-00A024BB830C.
userName
a valid user name on the IOM BRIDGE server host.
password
the password corresponding to userName.

The name/value pairs listed above are all required. Other name/value pairs may be appended to the URL following the same format as userName and password to control optional functionality.

encryptionPolicy
whether or not JavaBridge should attempt to negotiate with the server over which encryption algorithm to use and what to do if the negotiations fail. Possible values:
none
do not use encryption. This is the default.
optional
attempt to use encryption but, if algorithm negotiation fails, continue with an unencrypted session
required
attempt to use encryption but, if algorithm negotiation fails, fail the connection
encryptionContent
specifies which messages should be encrypted if encryption is used. Possible values:
all
encrypt all messages. This is the default.
authentication
encrypt only messages that contain user name and password information.
encryptionAlgorithms
the list of algorithms you are willing to use in order of preference. Values in the list should be separated by commas and chosen from sasproprietary, rc2, rc4, des, or tripledes. If no value is specified, then one of the server's favorite algorithms will be used.

Note that the server's encryption policy is, by default, optional so no special action is needed to prepare an IOM BRIDGE server to use encryption. However, it is possible to set up the server so that encryption is required. Consult IOM BRIDGE server documentation for details.

Note also that name/value pairs containing &, =, or % need to be encoded since these characters are reserved in the URL format. Use java.net.URLEncoder to encode each name and each value individually.

Parameters:
url - a specially formatted URL indicating the identity and location of a remote object.
Returns:
a reference to the remote object

create_list

public org.omg.CORBA.NVList create_list(int count)
Create a name/value pair list.
Parameters:
count - the initial capacity of the list
Returns:
a name/value pair list

create_named_value

public org.omg.CORBA.NamedValue create_named_value(java.lang.String s,
                                                   org.omg.CORBA.Any any,
                                                   int flags)
Create a name/value pair.
Parameters:
s - the name
any - the value
flags - argument direction. One of ARG_IN, ARG_OUT or ARG_INOUT
Returns:
a name/value pair

create_exception_list

public org.omg.CORBA.ExceptionList create_exception_list()
Create a list of exceptions raised by an operation.
Returns:
a list of exceptions raised by an operation

create_context_list

public org.omg.CORBA.ContextList create_context_list()
Create a list of Context objects. If BrgOrb is the singleton orb, then this method will throw org.omg.CORBA.NO_IMPLEMENT.
Returns:
a list of Context objects

get_default_context

public org.omg.CORBA.Context get_default_context()
Create a Context object. If BrgOrb is the singleton orb, then this method will throw org.omg.CORBA.NO_IMPLEMENT.
Returns:
a Context object

create_environment

public org.omg.CORBA.Environment create_environment()
Creates an environment which holds the exception raised by an operation invocation.
Returns:
an environment.

create_output_stream

public org.omg.CORBA.portable.OutputStream create_output_stream()
Create a stream for serializing parameters.
Returns:
a stream for serializing parameters

send_multiple_requests_oneway

public void send_multiple_requests_oneway(org.omg.CORBA.Request[] req)
Throws NO_IMPLEMENT.

send_multiple_requests_deferred

public void send_multiple_requests_deferred(org.omg.CORBA.Request[] req)
Throws NO_IMPLEMENT.

poll_next_response

public boolean poll_next_response()
Throws NO_IMPLEMENT.

get_next_response

public org.omg.CORBA.Request get_next_response()
Throws NO_IMPLEMENT.

get_primitive_tc

public org.omg.CORBA.TypeCode get_primitive_tc(org.omg.CORBA.TCKind tcKind)
Get the TypeCode object representing a particular primitive type.
Parameters:
enumerated - value representing the desired primitive type.
Returns:
a TypeCode object

create_struct_tc

public org.omg.CORBA.TypeCode create_struct_tc(java.lang.String id,
                                               java.lang.String name,
                                               org.omg.CORBA.StructMember[] members)
Create a TypeCode object representing a struct.
Parameters:
id - interface repository ID
name - name of struct
members - the struct members
Returns:
a TypeCode object representing a struct.

create_union_tc

public org.omg.CORBA.TypeCode create_union_tc(java.lang.String id,
                                              java.lang.String name,
                                              org.omg.CORBA.TypeCode discriminator_type,
                                              org.omg.CORBA.UnionMember[] members)
Create a TypeCode object representing a union.
Parameters:
id - interface repository ID
name - name of union
discriminator_type - the discriminator type
members - the union members
Returns:
a TypeCode object representing a union.

create_enum_tc

public org.omg.CORBA.TypeCode create_enum_tc(java.lang.String id,
                                             java.lang.String name,
                                             java.lang.String[] members)
Create a TypeCode object representing an enum.
Parameters:
id - interface repository ID
name - name of enum
members - the enum members
Returns:
a TypeCode object representing an enum.

create_alias_tc

public org.omg.CORBA.TypeCode create_alias_tc(java.lang.String id,
                                              java.lang.String name,
                                              org.omg.CORBA.TypeCode original_type)
Create a TypeCode object representing another TypeCode object.
Parameters:
id - interface repository ID
name - name of alias type
original_type - the original TypeCode object
Returns:
a TypeCode object representing another TypeCode object.

create_exception_tc

public org.omg.CORBA.TypeCode create_exception_tc(java.lang.String id,
                                                  java.lang.String name,
                                                  org.omg.CORBA.StructMember[] members)
Create a TypeCode object representing an exception.
Parameters:
id - interface repository ID
name - name of exception
members - the exception members
Returns:
a TypeCode object representing a exception.

create_interface_tc

public org.omg.CORBA.TypeCode create_interface_tc(java.lang.String id,
                                                  java.lang.String name)
Create a TypeCode object representing an interface.
Parameters:
id - interface repository ID
name - name of interface
Returns:
a TypeCode object representing an interface.

create_string_tc

public org.omg.CORBA.TypeCode create_string_tc(int bound)
Create a TypeCode object representing a string.
Parameters:
bound - maximum size of string, or 0 to indicate unbounded string
Returns:
a TypeCode object representing a string.

create_wstring_tc

public org.omg.CORBA.TypeCode create_wstring_tc(int bound)
Create a TypeCode object representing a wide string.
Parameters:
bound - maximum size of string, or 0 to indicate unbounded string
Returns:
a TypeCode object representing a wide string.

create_sequence_tc

public org.omg.CORBA.TypeCode create_sequence_tc(int bound,
                                                 org.omg.CORBA.TypeCode element_type)
Create a TypeCode object representing a sequence.
Parameters:
bound - maximum size of sequence, or 0 to indicate unbounded sequence
element_type - the element type
Returns:
a TypeCode object representing a sequence.

create_recursive_sequence_tc

public org.omg.CORBA.TypeCode create_recursive_sequence_tc(int bound,
                                                           int offset)
Deprecated.  

Create a TypeCode object representing a recursive sequence. Throws org.omg.CORBA.NO_IMPLEMENT if the singleton orb is BrgOrb.
Parameters:
bound - maximum size of sequence, or 0 to indicate unbounded sequence
offset - offset within sequence

create_array_tc

public org.omg.CORBA.TypeCode create_array_tc(int length,
                                              org.omg.CORBA.TypeCode element_type)
Create a TypeCode object representing an array.
Parameters:
length - size of array
element_type - the element type
Returns:
a TypeCode object representing an array.

get_current

public org.omg.CORBA.Current get_current()
Deprecated.  

Get a Current object If the singleton orb is BrgOrb, then this method throws org.omg.CORBA.NO_IMPLEMENT.
Returns:
a Current object

create_any

public org.omg.CORBA.Any create_any()
Create an Any object.
Returns:
an Any object

getNextClientID

public int getNextClientID()

addEngine

public void addEngine(com.sas.net.brg.orb.ProtocolEngineInterface engine)

getGenericObject

public com.sas.net.brg.orb.GenericObject getGenericObject()

returnGenericObject

public void returnGenericObject(com.sas.net.brg.orb.GenericObject obj)

getDelegateBase

public com.sas.net.brg.orb.DelegateBase getDelegateBase()

returnDelegateBase

public void returnDelegateBase(com.sas.net.brg.orb.DelegateBase delegateBase)

getActiveObjectMap

public java.util.Map getActiveObjectMap()

getActiveObjectMapKey

public com.sas.net.brg.orb.ActiveObjectMapKey getActiveObjectMapKey()

returnActiveObjectMapKey

public void returnActiveObjectMapKey(com.sas.net.brg.orb.ActiveObjectMapKey activeObjectMapKey)