org.jboss.ha.jndi
Class HANamingService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.ha.jndi.DetachedHANamingService (src) 
              extended byorg.jboss.ha.jndi.HANamingService
All Implemented Interfaces:
DetachedHANamingServiceMBean (src) , HANamingServiceMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class HANamingService
extends DetachedHANamingService (src)
implements HANamingServiceMBean (src)

Management Bean for HA-JNDI service for the legacy version that is coupled to the RMI/JRMP protocol. The DetachedHANamingService should be used with the approriate detached invoker service.


Field Summary
protected  java.rmi.server.RMIClientSocketFactory clientSocketFactory
          An optional custom client socket factory
protected  java.lang.String clientSocketFactoryName
          The class name of the optional custom client socket factory
protected  int rmiPort
          The RMI port on which the Naming implementation will be exported.
protected  java.rmi.server.RMIServerSocketFactory serverSocketFactory
          An optional custom server socket factory
protected  java.lang.String serverSocketFactoryName
          The class name of the optional custom server socket factory
 
Fields inherited from class org.jboss.ha.jndi.DetachedHANamingService (src)
adGroupAddress, adGroupPort, autoDiscovery, autoDiscoveryTTL, backlog, bindAddress, bootstrapSocket, discoveryBindAddress, discoveryDisabled, jnpServerSocketFactory, jnpServerSocketFactoryName, lookupPool, marshalledInvocationMapping, partition, partitionName, port, stub, theServer
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
HANamingService()
           
 
Method Summary
 java.lang.String getClientSocketFactory()
          Client socket factory to be used for client-server RMI invocations during JNDI queries
protected  Naming (src) getNamingProxy()
          Get the Naming proxy for the transport.
 int getRmiPort()
           
 java.lang.String getServerSocketFactory()
          Server socket factory to be used for client-server RMI invocations during JNDI queries
 void setClientSocketFactory(java.lang.String factoryClassName)
           
 void setRmiPort(int p)
          RmiPort to be used by the HA-JNDI service once bound.
 void setServerSocketFactory(java.lang.String factoryClassName)
           
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 
Methods inherited from class org.jboss.ha.jndi.DetachedHANamingService (src)
createService, findHAPartitionWithName, getAutoDiscoveryAddress, getAutoDiscoveryBindAddress, getAutoDiscoveryGroup, getAutoDiscoveryTTL, getBacklog, getBindAddress, getDiscoveryDisabled, getMethodMap, getPartitionName, getPort, getProxyFactoryObjectName, initBootstrapListener, invoke, setAutoDiscoveryAddress, setAutoDiscoveryBindAddress, setAutoDiscoveryGroup, setAutoDiscoveryTTL, setBacklog, setBindAddress, setDiscoveryDisabled, setJNPServerSocketFactory, setLookupPool, setPartitionName, setPort, setProxyFactoryObjectName, startService, startService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ha.jndi.DetachedHANamingServiceMBean (src)
getAutoDiscoveryAddress, getAutoDiscoveryBindAddress, getAutoDiscoveryGroup, getAutoDiscoveryTTL, getBacklog, getBindAddress, getDiscoveryDisabled, getMethodMap, getPartitionName, getPort, getProxyFactoryObjectName, invoke, setAutoDiscoveryAddress, setAutoDiscoveryBindAddress, setAutoDiscoveryGroup, setAutoDiscoveryTTL, setBacklog, setBindAddress, setDiscoveryDisabled, setLookupPool, setPartitionName, setPort, setProxyFactoryObjectName
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Field Detail

clientSocketFactory

protected java.rmi.server.RMIClientSocketFactory clientSocketFactory
An optional custom client socket factory


serverSocketFactory

protected java.rmi.server.RMIServerSocketFactory serverSocketFactory
An optional custom server socket factory


clientSocketFactoryName

protected java.lang.String clientSocketFactoryName
The class name of the optional custom client socket factory


serverSocketFactoryName

protected java.lang.String serverSocketFactoryName
The class name of the optional custom server socket factory


rmiPort

protected int rmiPort
The RMI port on which the Naming implementation will be exported. The default is 0 which means use any available port.

Constructor Detail

HANamingService

public HANamingService()
Method Detail

setRmiPort

public void setRmiPort(int p)
Description copied from interface: HANamingServiceMBean (src)
RmiPort to be used by the HA-JNDI service once bound. 0 => auto.

Specified by:
setRmiPort in interface HANamingServiceMBean (src)

getRmiPort

public int getRmiPort()
Specified by:
getRmiPort in interface HANamingServiceMBean (src)

getClientSocketFactory

public java.lang.String getClientSocketFactory()
Description copied from interface: HANamingServiceMBean (src)
Client socket factory to be used for client-server RMI invocations during JNDI queries

Specified by:
getClientSocketFactory in interface HANamingServiceMBean (src)

setClientSocketFactory

public void setClientSocketFactory(java.lang.String factoryClassName)
                            throws java.lang.ClassNotFoundException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Specified by:
setClientSocketFactory in interface HANamingServiceMBean (src)
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

getServerSocketFactory

public java.lang.String getServerSocketFactory()
Description copied from interface: HANamingServiceMBean (src)
Server socket factory to be used for client-server RMI invocations during JNDI queries

Specified by:
getServerSocketFactory in interface HANamingServiceMBean (src)

setServerSocketFactory

public void setServerSocketFactory(java.lang.String factoryClassName)
                            throws java.lang.ClassNotFoundException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Specified by:
setServerSocketFactory in interface HANamingServiceMBean (src)
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

stopService

protected void stopService()
                    throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class DetachedHANamingService (src)
Throws:
java.lang.Exception

getNamingProxy

protected Naming (src)  getNamingProxy()
                         throws java.lang.Exception
Description copied from class: DetachedHANamingService (src)
Get the Naming proxy for the transport. This version looks up the proxyFactory service Proxy attribute. Subclasses can override this to set the proxy another way.

Overrides:
getNamingProxy in class DetachedHANamingService (src)
Returns:
The Naming proxy for the protocol used with the HAJNDI service
Throws:
java.lang.Exception