org.apache.tuscany.sca.host.corba.naming
Class TransientNameService

java.lang.Object
  extended by org.apache.tuscany.sca.host.corba.naming.TransientNameService

public class TransientNameService
extends java.lang.Object

A transient name service attached to an ORB. This class manages all of the housekeeping for creating a TransientNamingContext and a exposing it using an ORB.


Field Summary
protected  org.omg.CORBA.ORB createdOrb
           
static java.lang.String DEFAULT_SERVICE_HOST
           
static java.lang.String DEFAULT_SERVICE_NAME
           
static int DEFAULT_SERVICE_PORT
           
protected  java.lang.String host
           
protected  TransientNamingContext initialContext
           
protected  int port
           
protected  java.lang.String serviceName
           
 
Constructor Summary
TransientNameService()
          Create a new TransientNameService, using all default attributes.
TransientNameService(java.lang.String host, int port)
          Create a default-named name service using the specified host and port parameters.
TransientNameService(java.lang.String host, int port, java.lang.String name)
          Create a specifically-named name service using the specified host and port parameters.
 
Method Summary
 void destroy()
          Destroy the created service.
 org.omg.CORBA.ORB getORB()
           
 void initialize(org.omg.CORBA.ORB orb)
          Initialize a transient name service on a specific ORB.
 void run()
          Start up the name service, including creating an ORB instance to expose it under.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVICE_NAME

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

DEFAULT_SERVICE_PORT

public static final int DEFAULT_SERVICE_PORT
See Also:
Constant Field Values

DEFAULT_SERVICE_HOST

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

initialContext

protected TransientNamingContext initialContext

port

protected int port

host

protected java.lang.String host

serviceName

protected java.lang.String serviceName

createdOrb

protected org.omg.CORBA.ORB createdOrb
Constructor Detail

TransientNameService

public TransientNameService()
Create a new TransientNameService, using all default attributes.


TransientNameService

public TransientNameService(java.lang.String host,
                            int port)
Create a default-named name service using the specified host and port parameters.

Parameters:
host - The host to expose this under.
port - The initial listening port.

TransientNameService

public TransientNameService(java.lang.String host,
                            int port,
                            java.lang.String name)
Create a specifically-named name service using the specified host and port parameters.

Parameters:
host - The host to expose this under.
port - The initial listening port.
name - The name to register this service under using the BootManager.
Method Detail

run

public void run()
         throws TransientServiceException
Start up the name service, including creating an ORB instance to expose it under.

Throws:
TransientServiceException

initialize

public void initialize(org.omg.CORBA.ORB orb)
                throws TransientServiceException
Initialize a transient name service on a specific ORB.

Parameters:
orb - The ORB hosting the service.
Throws:
TransientServiceException

destroy

public void destroy()
Destroy the created service.


getORB

public org.omg.CORBA.ORB getORB()