com.arjuna.orbportability
Class Services

java.lang.Object
  extended by com.arjuna.orbportability.Services

public class Services
extends 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 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 String nameService
           
static String otsKind
           
static int RESOLVE_INITIAL_REFERENCES
           
static String transactionService
           
 
Constructor Summary
Services(ORB orb)
          Create a Services class which provides standard services for the given ORB instance.
 
Method Summary
static String bindString(int bindValue)
           
static int bindValue(String bindString)
          Given a binding mechanism string name return the enumerated value.
static int getResolver()
           
 Object getService(String serviceName, Object[] params)
          The default implementation (specified on a per-ORB basis.)
 Object getService(String serviceName, Object[] params, int mechanism)
           
 String[] listInitialServices()
           
 void registerService(Object objRef, String serviceName, Object[] params)
          The default implementation (probably specified on a per-ORB basis.)
 void registerService(Object objRef, String serviceName, 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 String[] BINDING_SERVICES

nameService

public static final String nameService
See Also:
Constant Field Values

transactionService

public static final String transactionService
See Also:
Constant Field Values

otsKind

public static final 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 Object getService(String serviceName,
                         Object[] params)
                  throws InvalidName,
                         IOException,
                         SystemException
The default implementation (specified on a per-ORB basis.)

Throws:
InvalidName
IOException
SystemException

getService

public Object getService(String serviceName,
                         Object[] params,
                         int mechanism)
                  throws InvalidName,
                         IOException,
                         SystemException
Throws:
InvalidName
IOException
SystemException

registerService

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

Throws:
InvalidName
IOException
SystemException

registerService

public void registerService(Object objRef,
                            String serviceName,
                            Object[] params,
                            int mechanism)
                     throws InvalidName,
                            IOException,
                            SystemException
Throws:
InvalidName
IOException
SystemException

listInitialServices

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

bindString

public static final String bindString(int bindValue)

bindValue

public static final int bindValue(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.

getResolver

public static final int getResolver()


Copyright © 2011. All Rights Reserved.