站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

DetachedHANamingService (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.ha.jndi
Class DetachedHANamingService

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

public class DetachedHANamingService
extends org.jboss.system.ServiceMBeanSupport
implements DetachedHANamingServiceMBean, Runnable

Management Bean for the protocol independent HA-JNDI service. This allows the naming service transport layer to be provided by a detached invoker service like JRMPInvokerHA + ProxyFactoryHA.

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

Nested Class Summary
protected  class DetachedHANamingService.AutomaticDiscovery
           
 
Field Summary
protected  String adGroupAddress
          The autodiscovery multicast group
protected  int adGroupPort
          The autodiscovery port
protected  DetachedHANamingService.AutomaticDiscovery autoDiscovery
           
protected  int backlog
          The bootstrapSocket listen queue depth
protected  InetAddress bindAddress
          The interface to bind to.
protected  ServerSocket bootstrapSocket
          The jnp server socket through which the HAJNDI stub is vended
protected  Map marshalledInvocationMapping
          The mapping from the long method hash to the Naming Method
protected  HAPartition partition
          The HAPartition used for the state transfer service
protected  String partitionName
          The partition name used to lookup the HAPartition binding
protected  int port
          The jnp protocol listening port.
protected  org.jnp.interfaces.Naming stub
          The protocol stub returned to clients by the bootstrap lookup
protected  HAJNDI theServer
          The Naming interface server implementation
 
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
DetachedHANamingService()
           
 
Method Summary
protected  void createService()
           
protected  HAPartition findHAPartitionWithName(String name)
           
 String getAutoDiscoveryAddress()
          Get the auto-discovery bootstrap multicast address.
 int getAutoDiscoveryGroup()
          Get the Auto-discovery multicast port
 int getBacklog()
          Get the accept backlog for the bootstrap server socket
 String getBindAddress()
          Get the bootstrap IP address on which the HA-JNDI stub is made available
 Map getMethodMap()
          Expose the Naming service interface mapping as a read-only attribute
protected  org.jnp.interfaces.Naming getNamingProxy()
          Get the Naming proxy for the transport.
 String getPartitionName()
          Get the name of the underlying partition for the cluster to use.
 int getPort()
          Get the bootstrap port on which the HA-JNDI stub is made available
 javax.management.ObjectName getProxyFactoryObjectName()
          Get the proxy factory service name used to create the Naming transport * proxy.
 Object invoke(org.jboss.invocation.Invocation invocation)
          Expose the Naming service via JMX to invokers.
protected  void listen()
           
 void run()
           
 void setAutoDiscoveryAddress(String adAddress)
          Set the auto-discovery bootstrap multicast address.
 void setAutoDiscoveryGroup(int adGroup)
          Set the Auto-discovery multicast port.
 void setBacklog(int backlog)
          Set the accept backlog for the bootstrap server socket
 void setBindAddress(String host)
          Set the bootstrap IP address on which the HA-JNDI stub is made available
 void setPartitionName(String partitionName)
          Set the name of the underlying partition for the cluster to use.
 void setPort(int p)
          Set the bootstrap port on which the HA-JNDI stub is made available
 void setProxyFactoryObjectName(javax.management.ObjectName proxyFactory)
          Set the proxy factory service name used to create the Naming transport * proxy.
protected  void startService()
           
 void startService(HAPartition haPartition)
           
protected  void stopService()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
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
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.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

bootstrapSocket

protected ServerSocket bootstrapSocket
The jnp server socket through which the HAJNDI stub is vended


theServer

protected HAJNDI theServer
The Naming interface server implementation


marshalledInvocationMapping

protected Map marshalledInvocationMapping
The mapping from the long method hash to the Naming Method


stub

protected org.jnp.interfaces.Naming stub
The protocol stub returned to clients by the bootstrap lookup


partition

protected HAPartition partition
The HAPartition used for the state transfer service


partitionName

protected String partitionName
The partition name used to lookup the HAPartition binding


bindAddress

protected InetAddress bindAddress
The interface to bind to. This is useful for multi-homed hosts that want control over which interfaces accept connections.


backlog

protected int backlog
The bootstrapSocket listen queue depth


port

protected int port
The jnp protocol listening port. The default is 1100, the same as the RMI registry default port.


adGroupAddress

protected String adGroupAddress
The autodiscovery multicast group


adGroupPort

protected int adGroupPort
The autodiscovery port


autoDiscovery

protected DetachedHANamingService.AutomaticDiscovery autoDiscovery
Constructor Detail

DetachedHANamingService

public DetachedHANamingService()
Method Detail

getMethodMap

public Map getMethodMap()
Expose the Naming service interface mapping as a read-only attribute

Specified by:
getMethodMap in interface DetachedHANamingServiceMBean
Returns:
A Map of the Naming interface

getPartitionName

public String getPartitionName()
Description copied from interface: DetachedHANamingServiceMBean
Get the name of the underlying partition for the cluster to use.

Specified by:
getPartitionName in interface DetachedHANamingServiceMBean

setPartitionName

public void setPartitionName(String partitionName)
Description copied from interface: DetachedHANamingServiceMBean
Set the name of the underlying partition for the cluster to use.

Specified by:
setPartitionName in interface DetachedHANamingServiceMBean

getProxyFactoryObjectName

public javax.management.ObjectName getProxyFactoryObjectName()
Description copied from interface: DetachedHANamingServiceMBean
Get the proxy factory service name used to create the Naming transport * proxy.

Specified by:
getProxyFactoryObjectName in interface DetachedHANamingServiceMBean

setProxyFactoryObjectName

public void setProxyFactoryObjectName(javax.management.ObjectName proxyFactory)
Description copied from interface: DetachedHANamingServiceMBean
Set the proxy factory service name used to create the Naming transport * proxy.

Specified by:
setProxyFactoryObjectName in interface DetachedHANamingServiceMBean

setPort

public void setPort(int p)
Description copied from interface: DetachedHANamingServiceMBean
Set the bootstrap port on which the HA-JNDI stub is made available

Specified by:
setPort in interface DetachedHANamingServiceMBean

getPort

public int getPort()
Description copied from interface: DetachedHANamingServiceMBean
Get the bootstrap port on which the HA-JNDI stub is made available

Specified by:
getPort in interface DetachedHANamingServiceMBean

getBindAddress

public String getBindAddress()
Description copied from interface: DetachedHANamingServiceMBean
Get the bootstrap IP address on which the HA-JNDI stub is made available

Specified by:
getBindAddress in interface DetachedHANamingServiceMBean

setBindAddress

public void setBindAddress(String host)
                    throws UnknownHostException
Description copied from interface: DetachedHANamingServiceMBean
Set the bootstrap IP address on which the HA-JNDI stub is made available

Specified by:
setBindAddress in interface DetachedHANamingServiceMBean
Throws:
UnknownHostException

getBacklog

public int getBacklog()
Description copied from interface: DetachedHANamingServiceMBean
Get the accept backlog for the bootstrap server socket

Specified by:
getBacklog in interface DetachedHANamingServiceMBean

setBacklog

public void setBacklog(int backlog)
Description copied from interface: DetachedHANamingServiceMBean
Set the accept backlog for the bootstrap server socket

Specified by:
setBacklog in interface DetachedHANamingServiceMBean

getAutoDiscoveryAddress

public String getAutoDiscoveryAddress()
Description copied from interface: DetachedHANamingServiceMBean
Get the auto-discovery bootstrap multicast address.

Specified by:
getAutoDiscoveryAddress in interface DetachedHANamingServiceMBean

setAutoDiscoveryAddress

public void setAutoDiscoveryAddress(String adAddress)
Description copied from interface: DetachedHANamingServiceMBean
Set the auto-discovery bootstrap multicast address. If null or empty, no * auto-discovery bootstrap socket will be created.

Specified by:
setAutoDiscoveryAddress in interface DetachedHANamingServiceMBean

getAutoDiscoveryGroup

public int getAutoDiscoveryGroup()
Description copied from interface: DetachedHANamingServiceMBean
Get the Auto-discovery multicast port

Specified by:
getAutoDiscoveryGroup in interface DetachedHANamingServiceMBean

setAutoDiscoveryGroup

public void setAutoDiscoveryGroup(int adGroup)
Description copied from interface: DetachedHANamingServiceMBean
Set the Auto-discovery multicast port.

Specified by:
setAutoDiscoveryGroup in interface DetachedHANamingServiceMBean

startService

public void startService(HAPartition haPartition)
                  throws Exception
Throws:
Exception

createService

protected void createService()
                      throws Exception
Throws:
Exception

startService

protected void startService()
                     throws Exception
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Throws:
Exception

invoke

public Object invoke(org.jboss.invocation.Invocation invocation)
              throws Exception
Expose the Naming service via JMX to invokers.

Specified by:
invoke in interface DetachedHANamingServiceMBean
Parameters:
invocation - A pointer to the invocation object
Returns:
Return value of method invocation.
Throws:
Exception - Failed to invoke method.

run

public void run()
Specified by:
run in interface Runnable

listen

protected void listen()

findHAPartitionWithName

protected HAPartition findHAPartitionWithName(String name)
                                       throws Exception
Throws:
Exception

getNamingProxy

protected org.jnp.interfaces.Naming getNamingProxy()
                                            throws Exception
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.

Returns:
The Naming proxy for the protocol used with the HAJNDI service
Throws:
Exception


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