org.objectweb.joram.mom.proxies

Class ProxyImpl

Implemented Interfaces:
java.io.Serializable

public class ProxyImpl
extends java.lang.Object
implements java.io.Serializable

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

See Also:
Serialized Form

Constructor Summary

ProxyImpl(ProxyAgentItf proxyAgent)
Constructs a ProxyImpl instance.

Method Summary

void
deleteProxy(AgentId from)
This method deletes the proxy by notifying its connected clients, denying the non acknowledged messages, deleting the temporary destinations, removing the subscriptions.
AgentId
getId()
void
initialize(boolean firstTime)
(Re)initializes the proxy.
void
react(AgentId from, Notification not)
Distributes the received notifications to the appropriate reactions.
void
reactToClientRequest(int key, AbstractJmsRequest request)
Method processing clients requests.
void
readBag(ObjectInputStream in)
String
toString()
void
writeBag(ObjectOutputStream out)

Constructor Details

ProxyImpl

public ProxyImpl(ProxyAgentItf proxyAgent)
Constructs a ProxyImpl instance.

Method Details

deleteProxy

public void 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.


getId

public AgentId getId()


initialize

public void initialize(boolean firstTime)
            throws Exception
(Re)initializes the proxy.


react

public void react(AgentId from,
                  Notification not)
            throws UnknownNotificationException
Distributes the received notifications to the appropriate reactions.

A JMS proxy reacts to:

  • SyncReply proxy synchronizing notification,
  • SetDMQRequest admin notification,
  • SetThreshRequest admin notification,
  • Monit_GetDMQSettings monitoring notification,
  • AbstractReply destination replies,
  • AdminReply administration replies,
  • fr.dyade.aaa.agent.UnknownAgent.

Throws:
UnknownNotificationException - If the notification is not expected.


reactToClientRequest

public void 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.


readBag

public void readBag(ObjectInputStream in)
            throws IOException,
                   ClassNotFoundException


toString

public String toString()


writeBag

public void writeBag(ObjectOutputStream out)
            throws IOException


Copyright B) 2004 Scalagent - All rights reserved