org.objectweb.joram.mom.proxies.ProxyImpl Class Reference

Inherits org.objectweb.joram.mom.proxies.ProxyImplMBean.

Inheritance diagram for org.objectweb.joram.mom.proxies.ProxyImpl:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.joram.mom.proxies.ProxyImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

long getPeriod ()
void setPeriod (long period)
 ProxyImpl (ProxyAgentItf proxyAgent)
String toString ()
void initialize (boolean firstTime) throws Exception
void reactToClientRequest (int key, AbstractJmsRequest request)
void react (AgentId from, Notification not) throws UnknownNotificationException
String[] getSubscriptionNames ()
void deleteSubscriptionMessage (String subName, String msgId)
void deleteProxy (AgentId from) throws Exception
void readBag (ObjectInputStream in) throws IOException, ClassNotFoundException
void writeBag (ObjectOutputStream out) throws IOException
long getNbMsgsSentToDMQSinceCreation ()

Static Public Attributes

static Logger logger = Debug.getLogger(ProxyImpl.class.getName())

Protected Member Functions

void doReact (AgentId from, SetNbMaxMsgRequest not)
void doReact (AgentId from, Monit_GetNbMaxMsg not)
final String getMsgTxname ()
final void setMsgTxName (Message msg)

Protected Attributes

long period = 60000L
long nbMsgsSentToDMQSinceCreation = 0

Package Functions

ClientContext getClientContext (int ctxId)
void cleanPendingMessages (long currentTime)

Package Attributes

transient String msgTxname = null

Detailed Description

The ProxyImpl class implements the MOM proxy behaviour, basically forwarding client requests to MOM destinations and MOM destinations replies to clients.

Definition at line 141 of file ProxyImpl.java.


Constructor & Destructor Documentation

org.objectweb.joram.mom.proxies.ProxyImpl.ProxyImpl ( ProxyAgentItf  proxyAgent  ) 

Constructs a ProxyImpl instance.

Definition at line 241 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ProxyImpl.logger.


Member Function Documentation

long org.objectweb.joram.mom.proxies.ProxyImpl.getPeriod (  ) 

Returns the period value of this queue, -1 if not set.

Returns:
the period value of this queue; -1 if not set.

Implements org.objectweb.joram.mom.proxies.ProxyImplMBean.

Definition at line 158 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ProxyImpl.period.

Referenced by org.objectweb.joram.mom.proxies.UserAgent.agentInitialize(), and org.objectweb.joram.mom.proxies.UserAgent.react().

void org.objectweb.joram.mom.proxies.ProxyImpl.setPeriod ( long  period  ) 

Sets or unsets the period for this queue.

Parameters:
period The period value to be set or -1 for unsetting previous value.

Implements org.objectweb.joram.mom.proxies.ProxyImplMBean.

Definition at line 168 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ProxyAgentItf.getId().

Here is the call graph for this function:

String org.objectweb.joram.mom.proxies.ProxyImpl.toString (  ) 

Returns a string representation of this user's proxy.

Implements org.objectweb.joram.mom.proxies.ProxyImplMBean.

Definition at line 252 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ProxyAgentItf.getId().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.ProxyImpl.initialize ( boolean  firstTime  )  throws Exception

(Re)initializes the proxy.

Exceptions:
Exception If the proxy state could not be fully retrieved, leading to an inconsistent state.

Definition at line 266 of file ProxyImpl.java.

References org.objectweb.joram.shared.client.XACnxPrepare.getAcks(), org.objectweb.joram.mom.proxies.ClientContext.getDeliveringQueues(), org.objectweb.joram.mom.proxies.ClientSubscription.getDurable(), org.objectweb.joram.mom.proxies.ClientContext.getId(), org.objectweb.joram.mom.proxies.ProxyImpl.getMsgTxname(), org.objectweb.joram.mom.proxies.ClientSubscription.getSelector(), org.objectweb.joram.shared.client.XACnxPrepare.getSendings(), org.objectweb.joram.mom.proxies.ClientContext.getTempDestinations(), org.objectweb.joram.mom.proxies.ClientSubscription.getTopicId(), org.objectweb.joram.mom.proxies.ClientContext.getTxIds(), org.objectweb.joram.mom.proxies.ClientContext.getTxPrepare(), org.objectweb.joram.mom.proxies.ProxyImpl.logger, org.objectweb.joram.mom.proxies.TopicSubscription.putSubscription(), org.objectweb.joram.mom.proxies.ClientSubscription.reinitialize(), org.objectweb.joram.mom.proxies.ProxyAgentItf.sendNot(), org.objectweb.joram.mom.proxies.ClientSubscription.setProxyAgent(), and fr.dyade.aaa.agent.AgentId.toString().

Referenced by org.objectweb.joram.mom.proxies.UserAgent.agentInitialize().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.ProxyImpl.reactToClientRequest ( int  key,
AbstractJmsRequest  request 
)

Method processing clients requests.

Some of the client requests are directly forwarded, some others are sent to the proxy so that their processing occurs in a transaction.

A MomExceptionReply wrapping a DestinationException might be sent back if a target destination can't be identified.

Definition at line 401 of file ProxyImpl.java.

References org.objectweb.joram.shared.client.AbstractJmsRequest.getRequestId(), and org.objectweb.joram.mom.proxies.ProxyImpl.logger.

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.ProxyImpl.react ( AgentId  from,
Notification  not 
) throws UnknownNotificationException

Distributes the received notifications to the appropriate reactions.

A JMS proxy reacts to:

Exceptions:
UnknownNotificationException If the notification is not expected.

Definition at line 592 of file ProxyImpl.java.

Referenced by org.objectweb.joram.mom.proxies.UserAgent.react().

void org.objectweb.joram.mom.proxies.ProxyImpl.doReact ( AgentId  from,
SetNbMaxMsgRequest  not 
) [protected]

Method implementing the reaction to a SetNbMaxMsgRequest instance setting the NbMaxMsg value for the subscription.

Definition at line 1517 of file ProxyImpl.java.

References org.objectweb.joram.mom.notifications.SetNbMaxMsgRequest.getNbMaxMsg(), org.objectweb.joram.mom.notifications.SetNbMaxMsgRequest.getSubName(), org.objectweb.joram.mom.proxies.ProxyAgentItf.sendNot(), and org.objectweb.joram.mom.proxies.ClientSubscription.setNbMaxMsg().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.ProxyImpl.doReact ( AgentId  from,
Monit_GetNbMaxMsg  not 
) [protected]

Method implementing the reaction to a Monit_GetNbMaxMsg notification requesting the number max of messages in the subscription.

Exceptions:
AccessException If the requester is not the administrator.

Definition at line 1543 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ClientSubscription.getNbMaxMsg(), and org.objectweb.joram.mom.notifications.Monit_GetNbMaxMsg.getSubName().

Here is the call graph for this function:

String [] org.objectweb.joram.mom.proxies.ProxyImpl.getSubscriptionNames (  ) 

Returns the list of subscriptions for this user. Each subscription is identified by its unique 'symbolic' name.

Returns:
The list of subscriptions for this user.

Implements org.objectweb.joram.mom.proxies.ProxyImplMBean.

Definition at line 2253 of file ProxyImpl.java.

void org.objectweb.joram.mom.proxies.ProxyImpl.deleteSubscriptionMessage ( String  subName,
String  msgId 
)

Deletes a particular pending message in a subscription. The subscription is identified by its unique name, the message is pointed out through its unique identifier.

Parameters:
subName The subscription unique name.
msgId The unique message's identifier.

Definition at line 2379 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ClientSubscription.deleteMessage().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.ProxyImpl.deleteProxy ( AgentId  from  )  throws Exception

This method deletes the proxy by notifying its connected clients, denying the non acknowledged messages, deleting the temporary destinations, removing the subscriptions.

Exceptions:
Exception If the requester is not an administrator.

Definition at line 2542 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ClientContext.getDeliveringQueues(), org.objectweb.joram.mom.proxies.ClientContext.getTempDestinations(), org.objectweb.joram.mom.proxies.ProxyImpl.logger, org.objectweb.joram.mom.proxies.ProxyAgentItf.sendNot(), and fr.dyade.aaa.agent.AgentId.toString().

Here is the call graph for this function:

long org.objectweb.joram.mom.proxies.ProxyImpl.getNbMsgsSentToDMQSinceCreation (  ) 

Returns the number of erroneous messages forwarded to the DMQ since creation time of this proxy..

Returns:
the number of erroneous messages forwarded to the DMQ.

Implements org.objectweb.joram.mom.proxies.ProxyImplMBean.

Definition at line 2799 of file ProxyImpl.java.

References org.objectweb.joram.mom.proxies.ProxyImpl.nbMsgsSentToDMQSinceCreation.


Member Data Documentation

long org.objectweb.joram.mom.proxies.ProxyImpl.period = 60000L [protected]

period to run the cleaning task, by default 60s.

Definition at line 148 of file ProxyImpl.java.

Referenced by org.objectweb.joram.mom.proxies.ProxyImpl.getPeriod().

long org.objectweb.joram.mom.proxies.ProxyImpl.nbMsgsSentToDMQSinceCreation = 0 [protected]

the number of erroneous messages forwarded to the DMQ

Definition at line 151 of file ProxyImpl.java.

Referenced by org.objectweb.joram.mom.proxies.ProxyImpl.cleanPendingMessages(), and org.objectweb.joram.mom.proxies.ProxyImpl.getNbMsgsSentToDMQSinceCreation().


The documentation for this class was generated from the following file:
Generated on Tue Sep 16 16:20:17 2008 for joram by  doxygen 1.5.0