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:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, DetachedHANamingServiceMBean, HANamingServiceMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, 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 appropriate detached invoker service.

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

Field Summary
protected  String replicantName
           
 
Fields inherited from class org.jboss.ha.jndi.DetachedHANamingService
clusterPartition
 
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.
 String getRmiBindAddress()
           
 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 setRmiBindAddress(String address)
          RmiBindAddress to be used by the HA-JNDI service once bound.
 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, getAutoDiscoveryAddress, getAutoDiscoveryBindAddress, getAutoDiscoveryGroup, getAutoDiscoveryTTL, getBacklog, getBindAddress, getDiscoveryDisabled, getDistributedTreeManager, getHAPartition, getLocalNamingInstance, getMethodMap, getPartitionName, getPort, getProxyFactoryObjectName, initBootstrapListener, invoke, setAutoDiscoveryAddress, setAutoDiscoveryBindAddress, setAutoDiscoveryGroup, setAutoDiscoveryTTL, setBacklog, setBindAddress, setDiscoveryDisabled, setDistributedTreeManager, setHAPartition, setJNPServerSocketFactory, setLocalNamingInstance, setLookupPool, setPort, setProxyFactoryObjectName, 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, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext
 
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, getDiscoveryDisabled, getDistributedTreeManager, getHAPartition, getMethodMap, getPartitionName, getPort, getProxyFactoryObjectName, invoke, setAutoDiscoveryAddress, setAutoDiscoveryBindAddress, setAutoDiscoveryGroup, setAutoDiscoveryTTL, setBacklog, setBindAddress, setDiscoveryDisabled, setDistributedTreeManager, setHAPartition, setLookupPool, 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

replicantName

protected String replicantName
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

getRmiBindAddress

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

setRmiBindAddress

public void setRmiBindAddress(String address)
                       throws UnknownHostException
Description copied from interface: HANamingServiceMBean
RmiBindAddress to be used by the HA-JNDI service once bound.

Specified by:
setRmiBindAddress in interface HANamingServiceMBean
Throws:
UnknownHostException

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 © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.