com.arjuna.orbportability
Class Services

java.lang.Object
  extended bycom.arjuna.orbportability.Services

public class Services
extends java.lang.Object

An attempt at some ORB portable ways of accessing ORB services.

Since:
JTS 1.0.
Version:
$Id: Services.java 2342 2006-03-30 13:06:17Z $
Author:
Mark Little (mark@arjuna.com)

Field Summary
static int BIND_CONNECT
           
static java.lang.String[] BINDING_SERVICES
           
static int CONFIGURATION_FILE
          The various means used to locate a service.
static int FILE
           
static int NAME_SERVICE
           
static int NAMED_CONNECT
           
static java.lang.String nameService
           
static java.lang.String otsKind
           
static int RESOLVE_INITIAL_REFERENCES
           
static java.lang.String transactionService
           
 
Constructor Summary
Services(ORB orb)
          Create a Services class which provides standard services for the given ORB instance.
 
Method Summary
static java.lang.String bindString(int bindValue)
           
static int bindValue(java.lang.String bindString)
          Given a binding mechanism string name return the enumerated value.
 org.omg.CORBA.Object getService(java.lang.String serviceName, java.lang.Object[] params)
          The default implementation (specified on a per-ORB basis.)
 org.omg.CORBA.Object getService(java.lang.String serviceName, java.lang.Object[] params, int mechanism)
           
 java.lang.String[] listInitialServices()
           
 void registerService(org.omg.CORBA.Object objRef, java.lang.String serviceName, java.lang.Object[] params)
          The default implementation (probably specified on a per-ORB basis.)
 void registerService(org.omg.CORBA.Object objRef, java.lang.String serviceName, java.lang.Object[] params, int mechanism)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_FILE

public static final int CONFIGURATION_FILE
The various means used to locate a service.

See Also:
Constant Field Values

RESOLVE_INITIAL_REFERENCES

public static final int RESOLVE_INITIAL_REFERENCES
See Also:
Constant Field Values

NAME_SERVICE

public static final int NAME_SERVICE
See Also:
Constant Field Values

FILE

public static final int FILE
See Also:
Constant Field Values

NAMED_CONNECT

public static final int NAMED_CONNECT
See Also:
Constant Field Values

BIND_CONNECT

public static final int BIND_CONNECT
See Also:
Constant Field Values

BINDING_SERVICES

public static final java.lang.String[] BINDING_SERVICES

nameService

public static final java.lang.String nameService
See Also:
Constant Field Values

transactionService

public static final java.lang.String transactionService
See Also:
Constant Field Values

otsKind

public static final java.lang.String otsKind
See Also:
Constant Field Values
Constructor Detail

Services

public Services(ORB orb)
Create a Services class which provides standard services for the given ORB instance.

Parameters:
orb - The orb the services should use.
Method Detail

getService

public org.omg.CORBA.Object getService(java.lang.String serviceName,
                                       java.lang.Object[] params)
                                throws org.omg.CORBA.ORBPackage.InvalidName,
                                       java.io.IOException,
                                       org.omg.CORBA.SystemException
The default implementation (specified on a per-ORB basis.)

Throws:
org.omg.CORBA.ORBPackage.InvalidName
java.io.IOException
org.omg.CORBA.SystemException

getService

public org.omg.CORBA.Object getService(java.lang.String serviceName,
                                       java.lang.Object[] params,
                                       int mechanism)
                                throws org.omg.CORBA.ORBPackage.InvalidName,
                                       java.io.IOException,
                                       org.omg.CORBA.SystemException
Throws:
org.omg.CORBA.ORBPackage.InvalidName
java.io.IOException
org.omg.CORBA.SystemException

registerService

public void registerService(org.omg.CORBA.Object objRef,
                            java.lang.String serviceName,
                            java.lang.Object[] params)
                     throws org.omg.CORBA.ORBPackage.InvalidName,
                            java.io.IOException,
                            org.omg.CORBA.SystemException
The default implementation (probably specified on a per-ORB basis.)

Throws:
org.omg.CORBA.ORBPackage.InvalidName
java.io.IOException
org.omg.CORBA.SystemException

registerService

public void registerService(org.omg.CORBA.Object objRef,
                            java.lang.String serviceName,
                            java.lang.Object[] params,
                            int mechanism)
                     throws org.omg.CORBA.ORBPackage.InvalidName,
                            java.io.IOException,
                            org.omg.CORBA.SystemException
Throws:
org.omg.CORBA.ORBPackage.InvalidName
java.io.IOException
org.omg.CORBA.SystemException

listInitialServices

public final java.lang.String[] listInitialServices()
                                             throws java.io.IOException,
                                                    org.omg.CORBA.SystemException
Returns:
the list of initial services that the ORB knows about. Only the names are returned, not the IORs.
Throws:
java.io.IOException
org.omg.CORBA.SystemException
Since:
JTS 2.1.1. getService/setService for INITIAL_REFERENCES could default to config file if not supported. Transparently.

bindString

public static final java.lang.String bindString(int bindValue)

bindValue

public static final int bindValue(java.lang.String bindString)
Given a binding mechanism string name return the enumerated value. If this is not a valid binding mechanism name then return -1.

Parameters:
bindString - The binding mechanism string name to look up.
Returns:
The enumerated value that this bind string represents.