org.objectweb.joram.client.jms

Class Destination

Implemented Interfaces:
javax.jms.Destination, javax.naming.Referenceable, java.io.Serializable, SoapObjectItf
Known Direct Subclasses:
ClusterDestination, Queue, Topic

public abstract class Destination
extends AdministeredObject
implements javax.jms.Destination

Implements the javax.jms.Destination interface and provides JORAM specific administration and monitoring methods.

See Also:
Serialized Form

Field Summary

protected String
adminName
Name given by the administrator.
protected String
agentId
Identifier of the agent destination.

Fields inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject

id, instancesTable

Constructor Summary

Destination()
Constructs an empty destination.
Destination(String agentId)
Constructs a destination.
Destination(String agentId, String name)
Constructs a destination.

Method Summary

Hashtable
code()
Codes a Destination as a Hashtable for travelling through the SOAP protocol.
void
delete()
Admin method removing this destination from the platform.
static String
doCreate(int serverId, String name, String className, Properties prop)
Admin method creating or retrieving a destination with a given name on a given server, and returning its identifier.
boolean
equals(Object obj)
Returns true if the parameter object is a Joram destination wrapping the same agent identifier.
String
getAdminName()
Returns the admin name of the destination.
DeadMQueue
getDMQ()
Monitoring method returning the dead message queue of this destination, null if not set.
String
getName()
Returns the name of the destination.
List
getReaders()
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.
Reference
getReference()
Sets the naming reference of a destination.
List
getWriters()
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.
boolean
isFreelyReadable()
Monitoring method returning true if this destination provides free READ access.
boolean
isFreelyWriteable()
Monitoring method returning true if this destination provides free WRITE access.
boolean
isQueue()
Returns true if the destination is a queue.
void
setDMQ(DeadMQueue dmq)
Admin method setting or unsetting a dead message queue for this destination.
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
unsetFreeReading()
Admin method unsetting free reading access to this destination.
void
unsetFreeWriting()
Admin method unsetting free writing access to this destination.
void
unsetReader(User user)
Admin method unsetting a given user as a reader on this destination.
void
unsetWriter(User user)
Admin method unsetting a given user as a writer on this destination.

Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject

code, getInstance, getReference

Field Details

adminName

protected String adminName
Name given by the administrator.


agentId

protected String agentId
Identifier of the agent destination.

Constructor Details

Destination

public Destination()
Constructs an empty destination.


Destination

public Destination(String agentId)
Constructs a destination.

Parameters:
agentId - Identifier of the agent destination.


Destination

public Destination(String agentId,
                   String name)
Constructs a destination.

Parameters:
agentId - Identifier of the agent destination.
name - Name set by administrator.

Method Details

code

public Hashtable code()
Codes a Destination as a Hashtable for travelling through the SOAP protocol.
Specified by:
code in interface SoapObjectItf
Overrides:
code in interface AdministeredObject


delete

public void delete()
            throws ConnectException,
                   AdminException,
                   javax.jms.JMSException
Admin method removing this destination from the platform.

Throws:
AdminException - Never thrown.


doCreate

public static String doCreate(int serverId,
                              String name,
                              String className,
                              Properties prop)
            throws ConnectException,
                   AdminException
Admin 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 deployement fails server side.

Parameters:
serverId - The identifier of the server where deploying the destination.
name - The destination name.
className - Name of the MOM destination class.
prop - Properties.

Throws:
AdminException - If the request fails.


equals

public boolean equals(Object obj)
Returns true if the parameter object is a Joram destination wrapping the same agent identifier.


getAdminName

public String getAdminName()
Returns the admin name of the destination.


getDMQ

public DeadMQueue 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:
AdminException - If the request fails.


getName

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


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:
AdminException - If the request fails.


getReference

public Reference getReference()
            throws NamingException
Sets the naming reference of a destination.
Overrides:
getReference in interface AdministeredObject


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:
AdminException - If the request fails.


isFreelyReadable

public boolean isFreelyReadable()
            throws ConnectException,
                   AdminException
Monitoring method returning true if this destination provides free READ access.

The request fails if the destination is deleted server side.

Throws:
AdminException - If the request fails.


isFreelyWriteable

public boolean isFreelyWriteable()
            throws ConnectException,
                   AdminException
Monitoring method returning true if this destination provides free WRITE access.

The request fails if the destination is deleted server side.

Throws:
AdminException - If the request fails.


isQueue

public boolean isQueue()
Returns true if the destination is a queue.


setDMQ

public void setDMQ(DeadMQueue dmq)
            throws ConnectException,
                   AdminException
Admin 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 (null for unsetting current DMQ).

Throws:
AdminException - If the request fails.


setFreeReading

public void setFreeReading()
            throws ConnectException,
                   AdminException
Admin method setting free reading access to this destination.

The request fails if this destination is deleted server side.

Throws:
AdminException - If the request fails.


setFreeWriting

public void setFreeWriting()
            throws ConnectException,
                   AdminException
Admin method setting free writing access to this destination.

The request fails if this destination is deleted server side.

Throws:
AdminException - If the request fails.


setReader

public void setReader(User user)
            throws ConnectException,
                   AdminException
Admin 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:
AdminException - If the request fails.


setWriter

public void setWriter(User user)
            throws ConnectException,
                   AdminException
Admin 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:
AdminException - If the request fails.


unsetFreeReading

public void unsetFreeReading()
            throws ConnectException,
                   AdminException
Admin method unsetting free reading access to this destination.

The request fails if this destination is deleted server side.

Throws:
AdminException - If the request fails.


unsetFreeWriting

public void unsetFreeWriting()
            throws ConnectException,
                   AdminException
Admin method unsetting free writing access to this destination.

The request fails if this destination is deleted server side.

Throws:
AdminException - If the request fails.


unsetReader

public void unsetReader(User user)
            throws ConnectException,
                   AdminException
Admin 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:
AdminException - If the request fails.


unsetWriter

public void unsetWriter(User user)
            throws ConnectException,
                   AdminException
Admin 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:
AdminException - If the request fails.


Copyright B) 2004 Scalagent - All rights reserved