|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.proxies.ProxyImpl
The ProxyImpl
class implements the MOM proxy behaviour,
basically forwarding client requests to MOM destinations and MOM
destinations replies to clients.
Constructor Summary | |
ProxyImpl(ProxyAgentItf proxyAgent)
Constructs a ProxyImpl instance. |
Method Summary | |
void |
deleteProxy(fr.dyade.aaa.agent.AgentId from)
This method deletes the proxy by notifying its connected clients, denying the non acknowledged messages, deleting the temporary destinations, removing the subscriptions. |
void |
deleteSubscriptionMessage(java.lang.String subName,
java.lang.String msgId)
Deletes a particular pending message in a subscription. |
protected void |
doReact(fr.dyade.aaa.agent.AgentId from,
Monit_GetNbMaxMsg not)
Method implementing the reaction to a Monit_GetNbMaxMsg notification requesting the
number max of messages in the subscription. |
protected void |
doReact(fr.dyade.aaa.agent.AgentId from,
SetNbMaxMsgRequest not)
Method implementing the reaction to a SetNbMaxMsgRequest
instance setting the NbMaxMsg value for the subscription. |
fr.dyade.aaa.agent.AgentId |
getId()
|
int |
getNbMaxMsg(java.lang.String subName)
Returns the maximum number of message for identified subscription. |
java.lang.String |
getStringId()
|
javax.management.openmbean.CompositeDataSupport |
getSubscriptionMessage(java.lang.String subName,
java.lang.String msgId)
Returns the description of a particular pending message in a subscription. |
int |
getSubscriptionMessageCount(java.lang.String subName)
Returns the number of pending messages for an identified subscription. |
java.lang.String[] |
getSubscriptionMessageIds(java.lang.String subName)
Returns the list of message's identifiers for a subscription. |
java.lang.String[] |
getSubscriptionNames()
Returns the list of subscriptions for this user. |
java.lang.String |
getSubscriptionTopicId(java.lang.String subName)
Returns the unique identifier of the topic related to this subscription. |
void |
initialize(boolean firstTime)
(Re)initializes the proxy. |
void |
react(fr.dyade.aaa.agent.AgentId from,
fr.dyade.aaa.agent.Notification not)
Distributes the received notifications to the appropriate reactions. |
void |
reactToClientRequest(int key,
AbstractJmsRequest request)
Method processing clients requests. |
void |
readBag(java.io.ObjectInputStream in)
|
void |
setNbMaxMsg(java.lang.String subName,
int nbMaxMsg)
Sets the maximum number of message for identified subscription. |
java.lang.String |
toString()
Returns a string representation of this user's proxy. |
void |
writeBag(java.io.ObjectOutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ProxyImpl(ProxyAgentItf proxyAgent)
ProxyImpl
instance.
Method Detail |
public java.lang.String toString()
toString
in interface ProxyImplMBean
public void initialize(boolean firstTime) throws java.lang.Exception
java.lang.Exception
- If the proxy state could not be fully retrieved,
leading to an inconsistent state.public void reactToClientRequest(int key, AbstractJmsRequest request)
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.
public void react(fr.dyade.aaa.agent.AgentId from, fr.dyade.aaa.agent.Notification not) throws fr.dyade.aaa.agent.UnknownNotificationException
A JMS proxy reacts to:
SyncReply
proxy synchronizing notification,SetDMQRequest
admin notification,SetThreshRequest
admin notification,SetNbMaxMsgRequest
admin notification,Monit_GetNbMaxMsg
admin notification,Monit_GetDMQSettings
monitoring notification,AbstractReply
destination replies,AdminReply
administration replies,fr.dyade.aaa.agent.UnknownAgent
.
fr.dyade.aaa.agent.UnknownNotificationException
- If the notification is not
expected.protected void doReact(fr.dyade.aaa.agent.AgentId from, SetNbMaxMsgRequest not)
SetNbMaxMsgRequest
instance setting the NbMaxMsg value for the subscription.
protected void doReact(fr.dyade.aaa.agent.AgentId from, Monit_GetNbMaxMsg not)
Monit_GetNbMaxMsg
notification requesting the
number max of messages in the subscription.
AccessException
- If the requester is not the administrator.public int getNbMaxMsg(java.lang.String subName)
getNbMaxMsg
in interface ProxyImplMBean
subName
- The subscription unique name.
public void setNbMaxMsg(java.lang.String subName, int nbMaxMsg)
setNbMaxMsg
in interface ProxyImplMBean
subName
- The subscription unique name.nbMaxMsg
- the maximum number of message for subscription (-1 set
no limit).public java.lang.String[] getSubscriptionNames()
getSubscriptionNames
in interface ProxyImplMBean
public int getSubscriptionMessageCount(java.lang.String subName)
getSubscriptionMessageCount
in interface ProxyImplMBean
subName
- The subscription unique name.
public java.lang.String getSubscriptionTopicId(java.lang.String subName)
getSubscriptionTopicId
in interface ProxyImplMBean
subName
- The subscription unique name.
public java.lang.String[] getSubscriptionMessageIds(java.lang.String subName)
getSubscriptionMessageIds
in interface ProxyImplMBean
subName
- The subscription unique name.
public javax.management.openmbean.CompositeDataSupport getSubscriptionMessage(java.lang.String subName, java.lang.String msgId) throws java.lang.Exception
getSubscriptionMessage
in interface ProxyImplMBean
subName
- The subscription unique name.msgId
- The unique message's identifier.
java.lang.Exception
public void deleteSubscriptionMessage(java.lang.String subName, java.lang.String msgId)
deleteSubscriptionMessage
in interface ProxyImplMBean
subName
- The subscription unique name.msgId
- The unique message's identifier.public void deleteProxy(fr.dyade.aaa.agent.AgentId from) throws java.lang.Exception
java.lang.Exception
- If the requester is not an administrator.public fr.dyade.aaa.agent.AgentId getId()
public java.lang.String getStringId()
public void readBag(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void writeBag(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |