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

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


org.jboss.ha.jndi
Class HAJNDI

java.lang.Object
  extended byorg.jboss.ha.jndi.HAJNDI
All Implemented Interfaces:
HAPartition.HAPartitionStateTransfer, org.jnp.interfaces.Naming, Remote, Serializable

public class HAJNDI
extends Object
implements HAPartition.HAPartitionStateTransfer, Serializable, org.jnp.interfaces.Naming

This class extends the JNP JNDI implementation. binds and unbinds will be distributed to all members of the cluster that are running HAJNDI. lookups will look for Names in HAJNDI then delegate to the local InitialContext

Version:
$Revision: 1.16.10.1 $
Author:
Bill Burke, Scott.Stark@jboss.org
See Also:
Serialized Form

Field Summary
protected  TreeHead delegate
           
protected  org.jnp.interfaces.Naming haStub
           
protected  HAPartition partition
           
 
Constructor Summary
HAJNDI(HAPartition partition)
           
 
Method Summary
 void bind(Name name, Object obj, String className)
           
 Context createSubcontext(Name name)
           
 Serializable getCurrentState()
          Called when a new node need to be initialized.
 org.jnp.interfaces.Naming getHAStub()
           
 void init()
           
 Collection list(Name name)
           
 Collection listBindings(Name name)
           
 Object lookup(Name name)
           
 void rebind(Name name, Object obj, String className)
           
 void setCurrentState(Serializable newState)
          This callback method is called when a new service starts on a new node: the state that it should hold is transfered to it through this callback
 void setHAStub(org.jnp.interfaces.Naming stub)
           
 void stop()
           
 void unbind(Name name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

partition

protected HAPartition partition

delegate

protected TreeHead delegate

haStub

protected org.jnp.interfaces.Naming haStub
Constructor Detail

HAJNDI

public HAJNDI(HAPartition partition)
       throws NamingException
Method Detail

init

public void init()
          throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

setHAStub

public void setHAStub(org.jnp.interfaces.Naming stub)

getHAStub

public org.jnp.interfaces.Naming getHAStub()

getCurrentState

public Serializable getCurrentState()
Description copied from interface: HAPartition.HAPartitionStateTransfer
Called when a new node need to be initialized. This is called on any existing node to determine a current state for this service.

Specified by:
getCurrentState in interface HAPartition.HAPartitionStateTransfer
Returns:
A serializable representation of the state

setCurrentState

public void setCurrentState(Serializable newState)
Description copied from interface: HAPartition.HAPartitionStateTransfer
This callback method is called when a new service starts on a new node: the state that it should hold is transfered to it through this callback

Specified by:
setCurrentState in interface HAPartition.HAPartitionStateTransfer
Parameters:
newState - The serialized representation of the state of the new service.

bind

public void bind(Name name,
                 Object obj,
                 String className)
          throws NamingException
Specified by:
bind in interface org.jnp.interfaces.Naming
Throws:
NamingException

rebind

public void rebind(Name name,
                   Object obj,
                   String className)
            throws NamingException
Specified by:
rebind in interface org.jnp.interfaces.Naming
Throws:
NamingException

unbind

public void unbind(Name name)
            throws NamingException
Specified by:
unbind in interface org.jnp.interfaces.Naming
Throws:
NamingException

lookup

public Object lookup(Name name)
              throws NamingException
Specified by:
lookup in interface org.jnp.interfaces.Naming
Throws:
NamingException

list

public Collection list(Name name)
                throws NamingException
Specified by:
list in interface org.jnp.interfaces.Naming
Throws:
NamingException

listBindings

public Collection listBindings(Name name)
                        throws NamingException
Specified by:
listBindings in interface org.jnp.interfaces.Naming
Throws:
NamingException

createSubcontext

public Context createSubcontext(Name name)
                         throws NamingException
Specified by:
createSubcontext in interface org.jnp.interfaces.Naming
Throws:
NamingException


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