public class ClusterDestination extends Destination
Modifier and Type | Field and Description |
---|---|
protected Hashtable |
cluster |
private static org.objectweb.util.monolog.api.Logger |
logger |
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
ACQUISITION_QUEUE, ACQUISITION_TOPIC, adminName, agentId, ALIAS_QUEUE, CLUSTER_QUEUE, DEAD_MQUEUE, DISTRIBUTION_QUEUE, DISTRIBUTION_TOPIC, FTP_QUEUE, JMXBeanName, QUEUE, QUEUE_TYPE, SCHEDULER_QUEUE, TEMPORARY, TOPIC, TOPIC_TYPE
Constructor and Description |
---|
ClusterDestination()
Constructs an empty clustered destination.
|
ClusterDestination(Hashtable cluster)
Constructs a cluster destination.
|
Modifier and Type | Method and Description |
---|---|
void |
addDestination(Destination dest)
Adds a destination to the cluster.
|
void |
addDestination(String location,
Destination dest)
Adds a destination to the cluster with the specified
location key. |
void |
fromReference(Reference ref)
Restores the administered object from a naming reference.
|
Hashtable |
getCluster() |
protected Destination |
getDestination()
return the appropriate destination of cluster
|
String |
getName()
Returns the name of the destination.
|
byte |
getType()
Returns the type of the destination: queue or topic, temporary or not.
|
void |
setCluster(Hashtable cluster) |
void |
setFreeReading()
Administration method setting free reading access to this destination.
|
void |
setFreeWriting()
Administration method setting free writing access to this destination.
|
void |
setReader(User user)
Administration method setting a given user as a reader on this destination.
|
void |
setWriter(User user)
Administration method setting a given user as a writer on this destination.
|
void |
toReference(Reference ref)
Sets the naming reference of an administered object.
|
addInterceptor, addInterceptors, addReader, addWriter, check, checkId, delete, doCreate, equals, getAdminName, getDMQ, getDMQId, getInterceptors, getJMXBeanName, getReaderList, getReaders, getStatistic, getStatistics, getStatistics, getWrapper, getWriterList, getWriters, hashCode, isFreelyReadable, isFreelyWriteable, isQueue, isTopic, newInstance, registerMBean, removeInterceptors, removeReader, removeWriter, replaceInterceptor, replaceInterceptor, scale, setDMQ, setDMQId, setFreelyReadable, setFreelyWriteable, setProperties, setWrapper, toXml, unregisterMBean, unsetFreeReading, unsetFreeWriting, unsetReader, unsetWriter
getReference
private static final long serialVersionUID
private static org.objectweb.util.monolog.api.Logger logger
protected Hashtable cluster
public ClusterDestination()
public ClusterDestination(Hashtable cluster)
cluster
- Hashtable of the cluster agent destination.public void setCluster(Hashtable cluster)
public Hashtable getCluster()
public void addDestination(Destination dest)
dest
- the Destinationpublic void addDestination(String location, Destination dest)
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.location
- the location keydest
- the Destinationprotected Destination getDestination()
public String getName()
getName
in interface DestinationMBean
getName
in class Destination
public byte getType()
getType
in class Destination
public void setReader(User user) throws ConnectException, AdminException
Destination
The request fails if this destination is deleted server side.
setReader
in class Destination
user
- User to be set as a reader.ConnectException
- If the administration connection is closed or broken.AdminException
- If the request fails.public void setWriter(User user) throws ConnectException, AdminException
Destination
The request fails if this destination is deleted server side.
setWriter
in class Destination
user
- User to be set as a writer.ConnectException
- If the administration connection is closed or broken.AdminException
- If the request fails.public void setFreeReading() throws ConnectException, AdminException
Destination
The request fails if this destination is deleted server side.
setFreeReading
in class Destination
ConnectException
- If the administration connection is closed or broken.AdminException
- If the request fails.public void setFreeWriting() throws ConnectException, AdminException
Destination
The request fails if this destination is deleted server side.
setFreeWriting
in class Destination
ConnectException
- If the administration connection is closed or broken.AdminException
- If the request fails.public void toReference(Reference ref) throws NamingException
toReference
in class Destination
NamingException
public void fromReference(Reference ref) throws NamingException
fromReference
in class Destination
NamingException
Copyright © 2015 ScalAgent D.T.. All Rights Reserved.