public class ClusterDestination extends Destination
| Modifier and Type | Field and Description |
|---|---|
protected Hashtable<String,Destination> |
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_TYPErand| Constructor and Description |
|---|
ClusterDestination()
Constructs an empty clustered destination.
|
ClusterDestination(Hashtable<String,Destination> 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<String,Destination> |
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<String,Destination> 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, unsetWritergetReferenceprivate static final long serialVersionUID
private static final org.objectweb.util.monolog.api.Logger logger
protected Hashtable<String,Destination> cluster
public ClusterDestination()
public ClusterDestination(Hashtable<String,Destination> cluster)
cluster - Hashtable of the cluster agent destination.public void setCluster(Hashtable<String,Destination> cluster)
public Hashtable<String,Destination> 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 DestinationMBeangetName in class Destinationpublic byte getType()
getType in class Destinationpublic void setReader(User user) throws ConnectException, AdminException
DestinationThe request fails if this destination is deleted server side.
setReader in class Destinationuser - 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
DestinationThe request fails if this destination is deleted server side.
setWriter in class Destinationuser - 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
DestinationThe request fails if this destination is deleted server side.
setFreeReading in class DestinationConnectException - If the administration connection is closed or broken.AdminException - If the request fails.public void setFreeWriting()
throws ConnectException,
AdminException
DestinationThe request fails if this destination is deleted server side.
setFreeWriting in class DestinationConnectException - If the administration connection is closed or broken.AdminException - If the request fails.public void toReference(Reference ref) throws NamingException
toReference in class DestinationNamingExceptionpublic void fromReference(Reference ref) throws NamingException
fromReference in class DestinationNamingExceptionCopyright © 2023 ScalAgent D.T.. All rights reserved.