Class Destination
- java.lang.Object
-
- org.objectweb.joram.client.jms.admin.AdministeredObject
-
- org.objectweb.joram.client.jms.Destination
-
- All Implemented Interfaces:
Serializable,Destination,Referenceable,DestinationMBean
- Direct Known Subclasses:
ClusterDestination,Queue,Topic
public abstract class Destination extends AdministeredObject implements Destination, DestinationMBean
Implements thejavax.jms.Destinationinterface and provides JORAM specific administration and monitoring methods.A Destination is a JMS administered object that encapsulates a Joram's specific address. It is created by an administrator and later used by JMS clients. Normally the JMS clients find administered objects by looking them up in a JNDI namespace.
Joram MOM Model
Server side, a destination is a component receiving messages from producers and answering to consuming requests from consumers. A destination might either be a queue or a topic:
- Queue: each messages is read only by a single client.
- Topic: All clients that have previously subscribed to this topic are notified of the corresponding message.
A destination provides methods to add and remove Interceptors, an interceptor is an object handling each message sent to the destination. Interceptors can read and also modify the messages. This enables filtering, transformation or content enrichment, for example adding a property into the message. Also Interceptors can stop the Interceptor chain by simply returning false to their intercept method invocation, in this case the transmission of the message is stopped.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringACQUISITION_QUEUEConstant defining the implementation class for a Queue allowing to collect data from external sources.static StringACQUISITION_TOPICConstant defining the implementation class for a Topic allowing to collect data from external sources.protected StringadminNameSymbolic name given by the administrator.protected StringagentIdIdentifier of the agent destination.static StringALIAS_QUEUEstatic StringCLUSTER_QUEUEConstant defining the implementation class for a clustered Queue.static StringDEAD_MQUEUEDeprecated.Since Joram 5.2.2 the DeadMQueue is a simple Queue.static StringDISTRIBUTION_QUEUEConstant defining the implementation class for a Queue allowing to forward data to external targets.static StringDISTRIBUTION_TOPICConstant defining the implementation class for a Queue allowing to forward data to external targets.static StringFTP_QUEUEConstant defining the implementation class for a Queue allowing to forward data with Ftp.protected StringJMXBeanNamestatic org.objectweb.util.monolog.api.Loggerloggerstatic StringQUEUEConstant defining the implementation class for a classic Queue.static byteQUEUE_TYPEConstant defining the type of a queue destination.static StringSCHEDULER_QUEUEConstant defining the implementation class for a scheduled Queue.private static longserialVersionUIDDefine serialVersionUID for interoperability.static byteTEMPORARYConstant defining the type of a temporary destination (OR'ed with queue or topic type depending of the real type of the destination).static StringTOPICConstant defining the implementation class for a classic Topic.static byteTOPIC_TYPEConstant defining the type of a topic destination.private bytetypeType of the destination: Queue or Topic, Temporary or not.(package private) AdminItfwrapperAdministration wrapper used to perform administration stuff.-
Fields inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
rand
-
-
Constructor Summary
Constructors Modifier Constructor Description Destination()protectedDestination(byte type)protectedDestination(String id, byte type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddInterceptor(String interceptor, Properties properties)Administration method add interceptor.voidaddInterceptors(String interceptors)Administration method add interceptors.voidaddReader(String proxyId)Administration method setting a given user as a reader on this destination.voidaddWriter(String proxyId)Administration method setting a given user as a writer on this destination.voidcheck()Check the destination identifier.static voidcheckId(String id)Check the specified destination identifier.voiddelete()Administration method removing this destination from the platform.protected voiddoCreate(int serverId, String name, String className, Properties props, Destination dest, byte type)Administration method creating or retrieving a destination with a given name on a given server, and returning its identifier.(package private) org.objectweb.joram.shared.admin.AdminReplydoRequest(org.objectweb.joram.shared.admin.AdminRequest request)Method actually sending anAdminRequestinstance to the platform and getting anAdminReplyinstance.booleanequals(Object obj)Returnstrueif the parameter object is a Joram destination wrapping the same Joram's Destination.voidfromReference(Reference ref)Restores the administered object from a naming reference.StringgetAdminName()Returns the symbolic administration name of the destination.QueuegetDMQ()Monitoring method returning the dead message queue of this destination, null if not set.StringgetDMQId()Monitoring method returning the dead message queue id of this destination, null if not set.StringgetInterceptors()Administration method to get interceptors list.static StringgetJMXBeanName(String base, Destination dest)StringgetName()Returns the internal name of the destination.ListgetReaderList()Monitoring method returning the list of all users that have a reading permission on this destination, or an empty list if no specific readers are set.ListgetReaders()Monitoring method returning the list of all users that have a reading permission on this destination, or an empty list if no specific readers are set.HashtablegetStatistic()Deprecated.HashtablegetStatistics()Returns values of all valid JMX attributes about the destination.HashtablegetStatistics(String attributes)Returns values of specified JMX attributes about the destination.bytegetType()Returns the type of the destination: queue or topic, temporary or not.protected AdminItfgetWrapper()Returns the administration wrapper to use.ListgetWriterList()Monitoring method returning the list of all users that have a writing permission on this destination, or an empty list if no specific writers are set.ListgetWriters()Monitoring method returning the list of all users that have a writing permission on this destination, or an empty list if no specific writers are set.inthashCode()booleanisFreelyReadable()Monitoring method returningtrueif this destination provides free READ access.booleanisFreelyWriteable()Monitoring method returningtrueif this destination provides free WRITE access.booleanisQueue()Returnstrueif the destination is a queue.booleanisTopic()Returnstrueif the destination is a topic.static DestinationnewInstance(String id, String name, byte type)StringregisterMBean(String base)voidremoveInterceptors(String interceptors)Administration method to remove interceptors.voidremoveReader(String proxyId)Administration method unsetting a given user as a reader on this destination.voidremoveWriter(String proxyId)Administration method unsetting a given user as a writer on this destination.voidreplaceInterceptor(String newInterceptor, String oldInterceptor)Administration method to replace interceptor.voidreplaceInterceptor(String newInterceptor, String oldInterceptor, Properties properties)Administration method to replace interceptor.voidscale(int op, String param)Administration method for scaling operations.voidsetDMQ(Queue dmq)Administration method setting or unsetting a dead message queue for this destination.voidsetDMQId(String dmqId)Administration method setting or unsetting a dead message queue for this destination.voidsetFreelyReadable(boolean readable)Administration method (un)setting free reading access to this destination.voidsetFreelyWriteable(boolean writeable)Administration method (un)setting free writing access to this destination.voidsetFreeReading()Administration method setting free reading access to this destination.voidsetFreeWriting()Administration method setting free writing access to this destination.org.objectweb.joram.shared.admin.AdminReplysetProperties(Properties prop)Administration method to set properties.voidsetReader(User user)Administration method setting a given user as a reader on this destination.voidsetWrapper(AdminItf wrapper)Sets the administration wrapper to use.voidsetWriter(User user)Administration method setting a given user as a writer on this destination.voidtoReference(Reference ref)Sets the naming reference of a connection factory.StringtoXml(int indent, int serverId)Format the destination properties in a XML format, the result can be used in an XML configuration script.voidunregisterMBean()voidunsetFreeReading()Administration method unsetting free reading access to this destination.voidunsetFreeWriting()Administration method unsetting free writing access to this destination.voidunsetReader(User user)Administration method unsetting a given user as a reader on this destination.voidunsetWriter(User user)Administration method unsetting a given user as a writer on this destination.-
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject
getReference
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Define serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
logger
public static org.objectweb.util.monolog.api.Logger logger
-
agentId
protected String agentId
Identifier of the agent destination. Be careful when using directly this attribute, it is null in clustered destination even the getDestination method is called.
-
TOPIC_TYPE
public static final byte TOPIC_TYPE
Constant defining the type of a topic destination.- See Also:
getType(),DestinationConstants.TOPIC_TYPE, Constant Field Values
-
QUEUE_TYPE
public static final byte QUEUE_TYPE
Constant defining the type of a queue destination.- See Also:
getType(),DestinationConstants.QUEUE_TYPE, Constant Field Values
-
TEMPORARY
public static final byte TEMPORARY
Constant defining the type of a temporary destination (OR'ed with queue or topic type depending of the real type of the destination).- See Also:
getType(),DestinationConstants.TEMPORARY, Constant Field Values
-
type
private byte type
Type of the destination: Queue or Topic, Temporary or not.- See Also:
getType()
-
adminName
protected String adminName
Symbolic name given by the administrator.
-
wrapper
AdminItf wrapper
Administration wrapper used to perform administration stuff.It is defined through AdminModule element, it is closed at the end of the script. if it is not defined the wrapper set at creation is used, if none the static AdminModule connection is used.
-
QUEUE
public static final String QUEUE
Constant defining the implementation class for a classic Queue.- See Also:
- Constant Field Values
-
TOPIC
public static final String TOPIC
Constant defining the implementation class for a classic Topic.- See Also:
- Constant Field Values
-
DEAD_MQUEUE
public static final String DEAD_MQUEUE
Deprecated.Since Joram 5.2.2 the DeadMQueue is a simple Queue.Constant defining the implementation class for a Dead Message Queue.- See Also:
- Constant Field Values
-
CLUSTER_QUEUE
public static final String CLUSTER_QUEUE
Constant defining the implementation class for a clustered Queue.- See Also:
- Constant Field Values
-
SCHEDULER_QUEUE
public static final String SCHEDULER_QUEUE
Constant defining the implementation class for a scheduled Queue.- See Also:
- Constant Field Values
-
ACQUISITION_QUEUE
public static final String ACQUISITION_QUEUE
Constant defining the implementation class for a Queue allowing to collect data from external sources. The nature of data collector is configurable through properties.- See Also:
- Constant Field Values
-
DISTRIBUTION_QUEUE
public static final String DISTRIBUTION_QUEUE
Constant defining the implementation class for a Queue allowing to forward data to external targets. The nature of data forwarder is configurable through properties.- See Also:
- Constant Field Values
-
ACQUISITION_TOPIC
public static final String ACQUISITION_TOPIC
Constant defining the implementation class for a Topic allowing to collect data from external sources. The nature of data collector is configurable through properties.- See Also:
- Constant Field Values
-
DISTRIBUTION_TOPIC
public static final String DISTRIBUTION_TOPIC
Constant defining the implementation class for a Queue allowing to forward data to external targets. The nature of data forwarder is configurable through properties.- See Also:
- Constant Field Values
-
ALIAS_QUEUE
public static final String ALIAS_QUEUE
- See Also:
- Constant Field Values
-
FTP_QUEUE
public static final String FTP_QUEUE
Constant defining the implementation class for a Queue allowing to forward data with Ftp. The nature of data forwarder is configurable through properties.- See Also:
- Constant Field Values
-
JMXBeanName
protected transient String JMXBeanName
-
-
Constructor Detail
-
Destination
public Destination()
-
Destination
protected Destination(byte type)
-
Destination
protected Destination(String id, byte type)
-
-
Method Detail
-
getName
public String getName()
Returns the internal name of the destination. This unique name is chosen internally by the MOM.- Specified by:
getNamein interfaceDestinationMBean- Returns:
- the internal name of the destination.
-
checkId
public static final void checkId(String id) throws InvalidDestinationException
Check the specified destination identifier.- Throws:
InvalidDestinationException- if an invalid destination identifier is specified.
-
check
public void check() throws InvalidDestinationExceptionCheck the destination identifier.- Throws:
InvalidDestinationException- if the destination identifier is invalid.
-
getType
public byte getType()
Returns the type of the destination: queue or topic, temporary or not.
-
getAdminName
public final String getAdminName()
Returns the symbolic administration name of the destination. This symbolic name is given by the user at creation, if it is unknown the internal name of this destination is returned.- Specified by:
getAdminNamein interfaceDestinationMBean- Returns:
- the symbolic name of the destination if any.
-
equals
public boolean equals(Object obj)
Returnstrueif the parameter object is a Joram destination wrapping the same Joram's Destination.
-
getWrapper
protected final AdminItf getWrapper() throws ConnectException
Returns the administration wrapper to use.- Returns:
- The wrapper to use.
- Throws:
ConnectException- if no wrapper is defined.
-
setWrapper
public void setWrapper(AdminItf wrapper)
Sets the administration wrapper to use. If not set the AdminModule static connection is used by default.- Parameters:
wrapper- The wrapper to use or null to unset.
-
doRequest
final org.objectweb.joram.shared.admin.AdminReply doRequest(org.objectweb.joram.shared.admin.AdminRequest request) throws AdminException, ConnectExceptionMethod actually sending anAdminRequestinstance to the platform and getting anAdminReplyinstance.- Parameters:
request- the administration request to send- Returns:
- the reply message
- Throws:
ConnectException- If the connection to the platform fails.AdminException- If the platform's reply is invalid, or if the request failed.
-
toXml
public String toXml(int indent, int serverId) throws ConnectException, AdminException
Format the destination properties in a XML format, the result can be used in an XML configuration script.- Parameters:
indent- use this indent for prefixing XML representation.serverId- server id hosting the destination object- Returns:
- returns a XML view of the queue (XML configuration format)
- Throws:
ConnectException- if the server is unreachableAdminException- if an error occurs
-
isQueue
public boolean isQueue()
Returnstrueif the destination is a queue.- Specified by:
isQueuein interfaceDestinationMBean
-
isTopic
public boolean isTopic()
Returnstrueif the destination is a topic.- Specified by:
isTopicin interfaceDestinationMBean
-
doCreate
protected void doCreate(int serverId, String name, String className, Properties props, Destination dest, byte type) throws ConnectException, AdminExceptionAdministration method creating or retrieving a destination with a given name on a given server, and returning its identifier.The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
- Parameters:
serverId- The identifier of the server where deploying the destination.name- The destination name.className- Name of the MOM destination class.props- The configuration properties of the destination.dest- The proxy object of the destination.type- The type of the destination: queue, topic, temporary or not.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
delete
public void delete() throws ConnectException, AdminException, JMSExceptionAdministration method removing this destination from the platform.- Specified by:
deletein interfaceDestinationMBean- Throws:
AdminException- Never thrown.ConnectException- If the administration connection is closed or broken.JMSException- Never thrown.
-
getJMXBeanName
public static String getJMXBeanName(String base, Destination dest)
-
unregisterMBean
public void unregisterMBean()
-
setFreeReading
public void setFreeReading() throws ConnectException, AdminExceptionAdministration method setting free reading access to this destination.The request fails if this destination is deleted server side.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
setFreeWriting
public void setFreeWriting() throws ConnectException, AdminExceptionAdministration method setting free writing access to this destination.The request fails if this destination is deleted server side.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
unsetFreeReading
public void unsetFreeReading() throws ConnectException, AdminExceptionAdministration method unsetting free reading access to this destination.The request fails if this destination is deleted server side.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
unsetFreeWriting
public void unsetFreeWriting() throws ConnectException, AdminExceptionAdministration method unsetting free writing access to this destination.The request fails if this destination is deleted server side.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
setReader
public void setReader(User user) throws ConnectException, AdminException
Administration method setting a given user as a reader on this destination.The request fails if this destination is deleted server side.
- Parameters:
user- User to be set as a reader.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
addReader
public void addReader(String proxyId) throws ConnectException, AdminException
Administration method setting a given user as a reader on this destination.This method should be only used by the JMX MBean.
- Specified by:
addReaderin interfaceDestinationMBean- Parameters:
proxyId- The unique identification of the user's proxy.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.addReader(java.lang.String)
-
setWriter
public void setWriter(User user) throws ConnectException, AdminException
Administration method setting a given user as a writer on this destination.The request fails if this destination is deleted server side.
- Parameters:
user- User to be set as a writer.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
addWriter
public void addWriter(String proxyId) throws ConnectException, AdminException
Administration method setting a given user as a writer on this destination.This method should be only used by the JMX MBean.
- Specified by:
addWriterin interfaceDestinationMBean- Parameters:
proxyId- The unique identification of the user's proxy.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.addWriter(java.lang.String)
-
unsetReader
public void unsetReader(User user) throws ConnectException, AdminException
Administration method unsetting a given user as a reader on this destination.The request fails if this destination is deleted server side.
- Parameters:
user- Reader to be unset.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
removeReader
public void removeReader(String proxyId) throws ConnectException, AdminException
Administration method unsetting a given user as a reader on this destination.This method should be only used by the JMX MBean.
- Specified by:
removeReaderin interfaceDestinationMBean- Parameters:
proxyId- The unique identification of the user's proxy.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.removeReader(java.lang.String)
-
unsetWriter
public void unsetWriter(User user) throws ConnectException, AdminException
Administration method unsetting a given user as a writer on this destination.The request fails if this destination is deleted server side.
- Parameters:
user- Writer to be unset.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
removeWriter
public void removeWriter(String proxyId) throws ConnectException, AdminException
Administration method unsetting a given user as a writer on this destination.This method should be only used by the JMX MBean.
- Specified by:
removeWriterin interfaceDestinationMBean- Parameters:
proxyId- The unique identification of the user's proxy.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.removeWriter(java.lang.String)
-
getReaders
public List getReaders() throws ConnectException, AdminException
Monitoring method returning the list of all users that have a reading permission on this destination, or an empty list if no specific readers are set.The request fails if the destination is deleted server side.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
getReaderList
public List getReaderList() throws ConnectException, AdminException
Monitoring method returning the list of all users that have a reading permission on this destination, or an empty list if no specific readers are set.This method should be only used by the JMX MBean.
- Specified by:
getReaderListin interfaceDestinationMBean- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.getReaderList()
-
getWriters
public List getWriters() throws ConnectException, AdminException
Monitoring method returning the list of all users that have a writing permission on this destination, or an empty list if no specific writers are set.The request fails if the destination is deleted server side.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
getWriterList
public List getWriterList() throws ConnectException, AdminException
Monitoring method returning the list of all users that have a writing permission on this destination, or an empty list if no specific writers are set.This method should be only used by the JMX MBean.
- Specified by:
getWriterListin interfaceDestinationMBean- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.getWriterList()
-
isFreelyReadable
public boolean isFreelyReadable() throws ConnectException, AdminExceptionMonitoring method returningtrueif this destination provides free READ access.The request fails if the destination is deleted server side.
- Specified by:
isFreelyReadablein interfaceDestinationMBean- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
setFreelyReadable
public void setFreelyReadable(boolean readable) throws ConnectException, AdminExceptionAdministration method (un)setting free reading access to this destination.This method should be only used by the JMX MBean.
- Specified by:
setFreelyReadablein interfaceDestinationMBean- Parameters:
readable- if true set the free reading access else disable.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.setFreelyReadable(boolean)
-
isFreelyWriteable
public boolean isFreelyWriteable() throws ConnectException, AdminExceptionMonitoring method returningtrueif this destination provides free WRITE access.The request fails if the destination is deleted server side.
- Specified by:
isFreelyWriteablein interfaceDestinationMBean- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
setFreelyWriteable
public void setFreelyWriteable(boolean writeable) throws ConnectException, AdminExceptionAdministration method (un)setting free writing access to this destination.This method should be only used by the JMX MBean.
- Specified by:
setFreelyWriteablein interfaceDestinationMBean- Parameters:
writeable- if true set the free writing access else disable.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
DestinationMBean.setFreelyWriteable(boolean)
-
getDMQ
public Queue getDMQ() throws ConnectException, AdminException
Monitoring method returning the dead message queue of this destination, null if not set.The request fails if the destination is deleted server side.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
getDMQId
public String getDMQId() throws ConnectException, AdminException
Monitoring method returning the dead message queue id of this destination, null if not set.The request fails if the destination is deleted server side.
- Specified by:
getDMQIdin interfaceDestinationMBean- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
setDMQ
public void setDMQ(Queue dmq) throws ConnectException, AdminException, InvalidDestinationException
Administration method setting or unsetting a dead message queue for this destination.The request fails if this destination is deleted server side.
- Parameters:
dmq- The dead message queue to be set (nullfor unsetting current DMQ).- Throws:
IllegalArgumentException- If the DMQ is not a valid JORAM destination.ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.InvalidDestinationException- If the specified destination is invalid.
-
setDMQId
public void setDMQId(String dmqId) throws ConnectException, AdminException, InvalidDestinationException
Administration method setting or unsetting a dead message queue for this destination.The request fails if this destination is deleted server side.
- Specified by:
setDMQIdin interfaceDestinationMBean- Parameters:
dmqId- The dead message queue Id to be set (nullfor unsetting current DMQ).- Throws:
IllegalArgumentException- If the DMQ is not a valid JORAM destination.ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.InvalidDestinationException- If the specified destination is invalid.
-
newInstance
public static Destination newInstance(String id, String name, byte type) throws AdminException
- Throws:
AdminException
-
getStatistic
public Hashtable getStatistic() throws ConnectException, AdminException
Deprecated.Return a set of statistic values from the destination.- Specified by:
getStatisticin interfaceDestinationMBean- Throws:
ConnectExceptionAdminException- See Also:
DestinationMBean.getStatistic()
-
getStatistics
public Hashtable getStatistics() throws ConnectException, AdminException
Returns values of all valid JMX attributes about the destination.- Specified by:
getStatisticsin interfaceDestinationMBean- Returns:
- a Hashtable containing the values of all valid JMX attributes about the destination. The keys are the name of corresponding attributes.
- Throws:
ConnectExceptionAdminException- See Also:
DestinationMBean.getStatistics()
-
getStatistics
public Hashtable getStatistics(String attributes) throws ConnectException, AdminException
Returns values of specified JMX attributes about the destination.- Parameters:
attributes- a comma separated list of requested JMX attribute names.- Returns:
- a Hashtable containing the values of the specified JMX attributes about the destination. The keys are the name of corresponding attributes.
- Throws:
ConnectExceptionAdminException- See Also:
DestinationMBean.getStatistics()
-
toReference
public void toReference(Reference ref) throws NamingException
Sets the naming reference of a connection factory.- Specified by:
toReferencein classAdministeredObject- Throws:
NamingException
-
fromReference
public void fromReference(Reference ref) throws NamingException
Restores the administered object from a naming reference.- Specified by:
fromReferencein classAdministeredObject- Throws:
NamingException
-
addInterceptors
public void addInterceptors(String interceptors) throws ConnectException, AdminException
Administration method add interceptors.- Specified by:
addInterceptorsin interfaceDestinationMBean- Parameters:
interceptors- list of string className interceptor (separate with ",")- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
getInterceptors
public String getInterceptors() throws ConnectException, AdminException
Administration method to get interceptors list.- Specified by:
getInterceptorsin interfaceDestinationMBean- Returns:
- list of string className interceptor (separate with ",")
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
removeInterceptors
public void removeInterceptors(String interceptors) throws ConnectException, AdminException
Administration method to remove interceptors.- Specified by:
removeInterceptorsin interfaceDestinationMBean- Parameters:
interceptors- list of string className interceptor (separate with ",")- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
replaceInterceptor
public void replaceInterceptor(String newInterceptor, String oldInterceptor) throws ConnectException, AdminException
Administration method to replace interceptor.- Parameters:
newInterceptor- the new className interceptor.oldInterceptor- the old className interceptor.- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
addInterceptor
public void addInterceptor(String interceptor, Properties properties) throws ConnectException, AdminException
Administration method add interceptor.- Parameters:
interceptor- the className interceptorproperties- the properties of this interceptor- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
replaceInterceptor
public void replaceInterceptor(String newInterceptor, String oldInterceptor, Properties properties) throws ConnectException, AdminException
Administration method to replace interceptor.- Parameters:
newInterceptor- the new className interceptor.oldInterceptor- the old className interceptor.properties- the properties of the new interceptor- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
setProperties
public org.objectweb.joram.shared.admin.AdminReply setProperties(Properties prop) throws ConnectException, AdminException
Administration method to set properties.- Parameters:
prop- the properties to update.- Returns:
- the admin reply
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
scale
public void scale(int op, String param) throws ConnectException, AdminExceptionAdministration method for scaling operations.- Parameters:
op- scaling operation: scale up, scale down or balance.param- parameter of the scaling operation.- Throws:
ConnectExceptionAdminException
-
-