org.jboss.ha.jndi
Class HANamingService

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.ha.jndi.DetachedHANamingService
              extended by org.jboss.ha.jndi.HANamingService
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, DetachedHANamingServiceMBean, HANamingServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class HANamingService
extends DetachedHANamingService
implements HANamingServiceMBean

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.

Version:
$Revision: 1.38.4.2 $
Author:
Bill Burke, Sacha Labourey, Scott.Stark@jboss.org

Field Summary
protected  RMIClientSocketFactory clientSocketFactory
          An optional custom client socket factory
protected  String clientSocketFactoryName
          The class name of the optional custom client socket factory
protected  String loadBalancePolicy
          The class name of the load balancing policy
protected  int rmiPort
          The RMI port on which the Naming implementation will be exported.
protected  RMIServerSocketFactory serverSocketFactory
          An optional custom server socket factory
protected  String serverSocketFactoryName
          The class name of the optional custom server socket factory
 
Fields inherited from class org.jboss.ha.jndi.DetachedHANamingService
adGroupAddress, adGroupPort, autoDiscovery, autoDiscoveryTTL, backlog, bindAddress, bootstrapSocket, clusterPartition, discoveryBindAddress, discoveryDisabled, jnpServerSocketFactory, jnpServerSocketFactoryName, lookupPool, marshalledInvocationMapping, partition, partitionName, port, stub, theServer
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
HANamingService()
           
 
Method Summary
 String getClientSocketFactory()
          Client socket factory to be used for client-server RMI invocations during JNDI queries
 String getLoadBalancePolicy()
           
protected  org.jnp.interfaces.Naming getNamingProxy()
          Get the Naming proxy for the transport.
 int getRmiPort()
           
 String getServerSocketFactory()
          Server socket factory to be used for client-server RMI invocations during JNDI queries
 void setClientSocketFactory(String factoryClassName)
           
 void setLoadBalancePolicy(String policyClassName)
          LoadBalancePolicy to be used by the HA-JNDI service.
 void setRmiPort(int p)
          RmiPort to be used by the HA-JNDI service once bound.
 void setServerSocketFactory(String factoryClassName)
           
protected  void stopService()
           
 
Methods inherited from class org.jboss.ha.jndi.DetachedHANamingService
createService, destroyService, findHAPartitionWithName, getAutoDiscoveryAddress, getAutoDiscoveryBindAddress, getAutoDiscoveryGroup, getAutoDiscoveryTTL, getBacklog, getBindAddress, getClusterPartition, getDiscoveryDisabled, getMethodMap, getPartitionName, getPort, getProxyFactoryObjectName, initBootstrapListener, invoke, setAutoDiscoveryAddress, setAutoDiscoveryBindAddress, setAutoDiscoveryGroup, setAutoDiscoveryTTL, setBacklog, setBindAddress, setClusterPartition, setDiscoveryDisabled, setJNPServerSocketFactory, setLookupPool, setPartitionName, setPort, setProxyFactoryObjectName, startService, startService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getDeploymentInfo, 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
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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
getAutoDiscoveryAddress, getAutoDiscoveryBindAddress, getAutoDiscoveryGroup, getAutoDiscoveryTTL, getBacklog, getBindAddress, getClusterPartition, getDiscoveryDisabled, getMethodMap, getPartitionName, getPort, getProxyFactoryObjectName, invoke, setAutoDiscoveryAddress, setAutoDiscoveryBindAddress, setAutoDiscoveryGroup, setAutoDiscoveryTTL, setBacklog, setBindAddress, setClusterPartition, setDiscoveryDisabled, setLookupPool, setPartitionName, setPort, setProxyFactoryObjectName
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

clientSocketFactory

protected RMIClientSocketFactory clientSocketFactory
An optional custom client socket factory


serverSocketFactory

protected RMIServerSocketFactory serverSocketFactory
An optional custom server socket factory


clientSocketFactoryName

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


serverSocketFactoryName

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


loadBalancePolicy

protected String loadBalancePolicy
The class name of the load balancing policy


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
RmiPort to be used by the HA-JNDI service once bound. 0 => auto.

Specified by:
setRmiPort in interface HANamingServiceMBean

getRmiPort

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

getClientSocketFactory

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

Specified by:
getClientSocketFactory in interface HANamingServiceMBean

setClientSocketFactory

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

getServerSocketFactory

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

Specified by:
getServerSocketFactory in interface HANamingServiceMBean

setServerSocketFactory

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

getLoadBalancePolicy

public String getLoadBalancePolicy()
Specified by:
getLoadBalancePolicy in interface HANamingServiceMBean

setLoadBalancePolicy

public void setLoadBalancePolicy(String policyClassName)
Description copied from interface: HANamingServiceMBean
LoadBalancePolicy to be used by the HA-JNDI service.

Specified by:
setLoadBalancePolicy in interface HANamingServiceMBean

stopService

protected void stopService()
                    throws Exception
Overrides:
stopService in class DetachedHANamingService
Throws:
Exception

getNamingProxy

protected org.jnp.interfaces.Naming getNamingProxy()
                                            throws Exception
Description copied from class: DetachedHANamingService
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
Returns:
The Naming proxy for the protocol used with the HAJNDI service
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.