com.caucho.resources.rmi
Class RmiRegistry

java.lang.Object
  extended by com.caucho.jca.ra.AbstractResourceAdapter
      extended by com.caucho.resources.rmi.RmiRegistry
All Implemented Interfaces:
ResourceAdapter

public class RmiRegistry
extends AbstractResourceAdapter

An RMI registry and its services. This resource is used to register services with an RMI Registry. The Registry is either on localhost, in which case it is created in the local JVM unless it already exists, or the Registry is on a remote server, in which case it is assumed that the Registry has already been started.


Constructor Summary
RmiRegistry()
           
 
Method Summary
 void addRmiService(RmiService service)
          Add an RMI service to register with this Registry.
 int getPort()
          The port for the Registry.
 java.lang.String getServer()
           
 void init()
           
 void setPort(int port)
          The port for the Registry, default is 1099.
 void setServer(java.lang.String server)
          The server that runs the RMI registry.
 void start(BootstrapContext ctx)
          Called when the resource starts.
 void stop()
          stop (unbind and unexport) all services
 
Methods inherited from class com.caucho.jca.ra.AbstractResourceAdapter
endpointActivation, endpointDeactivation, getXAResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RmiRegistry

public RmiRegistry()
Method Detail

setServer

public void setServer(java.lang.String server)
The server that runs the RMI registry. If this is `localhost' (the default), then the Registry is created on the localhost if it does not already exist. If the server is not localhost, then it is assumed that the remote Registry already exists.


getServer

public java.lang.String getServer()

setPort

public void setPort(int port)
The port for the Registry, default is 1099.


getPort

public int getPort()
The port for the Registry.


addRmiService

public void addRmiService(RmiService service)
                   throws ConfigException
Add an RMI service to register with this Registry.

Throws:
ConfigException

init

@PostConstruct
public void init()
          throws ConfigException
Throws:
ConfigException

start

public void start(BootstrapContext ctx)
           throws ResourceAdapterInternalException
Description copied from class: AbstractResourceAdapter
Called when the resource starts.

Specified by:
start in interface ResourceAdapter
Overrides:
start in class AbstractResourceAdapter
Throws:
ResourceAdapterInternalException

stop

public void stop()
stop (unbind and unexport) all services

Specified by:
stop in interface ResourceAdapter
Overrides:
stop in class AbstractResourceAdapter