Joram 5.1.0

org.objectweb.joram.client.jms.admin
Class ClusterDestination

java.lang.Object
  extended by org.objectweb.joram.client.jms.admin.AdministeredObject
      extended by org.objectweb.joram.client.jms.Destination
          extended by org.objectweb.joram.client.jms.admin.ClusterDestination
All Implemented Interfaces:
fr.dyade.aaa.jndi2.soap.SoapObjectItf, java.io.Serializable, javax.jms.Destination, javax.naming.Referenceable, DestinationMBean
Direct Known Subclasses:
ClusterQueue, ClusterTopic

public class ClusterDestination
extends Destination

A base class for clustered destinations.

See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable cluster
           
 
Fields inherited from class org.objectweb.joram.client.jms.Destination
adminName, agentId, BRIDGE_QUEUE, BRIDGE_TOPIC, CLUSTER_QUEUE, DEAD_MQUEUE, MAIL_QUEUE, MAIL_TOPIC, QUEUE, SCHEDULER_QUEUE, TOPIC
 
Constructor Summary
ClusterDestination()
          Constructs an empty clustered destination.
ClusterDestination(java.util.Hashtable cluster)
          Constructs a cluster destination.
 
Method Summary
 void addDestination(Destination dest)
          Adds a destination to the cluster.
 void addDestination(java.lang.String location, Destination dest)
          Adds a destination to the cluster with the specified location key.
 java.util.Hashtable code()
          Codes a ClusterDestination as a Hashtable for travelling through the SOAP protocol.
 void decode(java.util.Hashtable h)
           
 void fromReference(javax.naming.Reference ref)
          Restores the administered object from a naming reference.
 java.util.Hashtable getCluster()
           
protected  Destination getDestination()
          return the appropriate destination of cluster
 java.lang.String getName()
          Returns the name of the destination.
 void setCluster(java.util.Hashtable cluster)
           
 void setFreeReading()
          Admin method setting free reading access to this destination.
 void setFreeWriting()
          Admin method setting free writing access to this destination.
 void setReader(User user)
          Admin method setting a given user as a reader on this destination.
 void setWriter(User user)
          Admin method setting a given user as a writer on this destination.
 void toReference(javax.naming.Reference ref)
          Sets the naming reference of an administered object.
 
Methods inherited from class org.objectweb.joram.client.jms.Destination
addReader, addWriter, delete, doCreate, equals, getAdminName, getDMQ, getDMQId, getReaderList, getReaders, getStatistic, getType, getWriterList, getWriters, isAssignableTo, isFreelyReadable, isFreelyWriteable, isQueue, newInstance, removeReader, removeWriter, setDMQ, setDMQId, setFreelyReadable, setFreelyWriteable, toString, toXml, unsetFreeReading, unsetFreeWriting, unsetReader, unsetWriter
 
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
getReference
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cluster

protected java.util.Hashtable cluster
Constructor Detail

ClusterDestination

public ClusterDestination()
Constructs an empty clustered destination.


ClusterDestination

public ClusterDestination(java.util.Hashtable cluster)
Constructs a cluster destination.

Parameters:
cluster - Hashtable of the cluster agent destination.
Method Detail

setCluster

public void setCluster(java.util.Hashtable cluster)

getCluster

public java.util.Hashtable getCluster()

addDestination

public void addDestination(Destination dest)
Adds a destination to the cluster. The object will be added with a key equals to the location property. Be careful, the object should be rebind after modification.

Parameters:
dest - the Destination

addDestination

public void addDestination(java.lang.String location,
                           Destination dest)
Adds a destination to the cluster with the specified location key. By default, the location value is set to the String server#i, where i is the server id. of the destination. Be careful, the object should be rebind after modification.

Parameters:
location - the location key
dest - the Destination

getDestination

protected Destination getDestination()
return the appropriate destination of cluster


getName

public java.lang.String getName()
Returns the name of the destination.

Specified by:
getName in interface DestinationMBean
Overrides:
getName in class Destination

setReader

public void setReader(User user)
               throws java.net.ConnectException,
                      AdminException
Description copied from class: Destination
Admin method setting a given user as a reader on this destination.

The request fails if this destination is deleted server side.

Overrides:
setReader in class Destination
Parameters:
user - User to be set as a reader.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

setWriter

public void setWriter(User user)
               throws java.net.ConnectException,
                      AdminException
Description copied from class: Destination
Admin method setting a given user as a writer on this destination.

The request fails if this destination is deleted server side.

Overrides:
setWriter in class Destination
Parameters:
user - User to be set as a writer.
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

setFreeReading

public void setFreeReading()
                    throws java.net.ConnectException,
                           AdminException
Description copied from class: Destination
Admin method setting free reading access to this destination.

The request fails if this destination is deleted server side.

Overrides:
setFreeReading in class Destination
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

setFreeWriting

public void setFreeWriting()
                    throws java.net.ConnectException,
                           AdminException
Description copied from class: Destination
Admin method setting free writing access to this destination.

The request fails if this destination is deleted server side.

Overrides:
setFreeWriting in class Destination
Throws:
java.net.ConnectException - If the admin connection is closed or broken.
AdminException - If the request fails.

toReference

public void toReference(javax.naming.Reference ref)
                 throws javax.naming.NamingException
Sets the naming reference of an administered object.

Overrides:
toReference in class Destination
Throws:
javax.naming.NamingException

fromReference

public void fromReference(javax.naming.Reference ref)
                   throws javax.naming.NamingException
Restores the administered object from a naming reference.

Overrides:
fromReference in class Destination
Throws:
javax.naming.NamingException

code

public java.util.Hashtable code()
Codes a ClusterDestination as a Hashtable for travelling through the SOAP protocol.

Specified by:
code in interface fr.dyade.aaa.jndi2.soap.SoapObjectItf
Overrides:
code in class Destination

decode

public void decode(java.util.Hashtable h)
Specified by:
decode in interface fr.dyade.aaa.jndi2.soap.SoapObjectItf
Overrides:
decode in class Destination

Joram 5.1.0

Copyright © 2005 Scalagent - All rights reserved