org.objectweb.joram.mom.proxies
Class ProxyImpl

java.lang.Object
  extended byorg.objectweb.joram.mom.proxies.ProxyImpl
All 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(java.io.ObjectInputStream in)
           
 java.lang.String toString()
           
 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

ProxyImpl

public ProxyImpl(ProxyAgentItf proxyAgent)
Constructs a ProxyImpl instance.

Method Detail

toString

public java.lang.String toString()

initialize

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

Throws:
java.lang.Exception - If the proxy state could not be fully retrieved, leading to an inconsistent state.

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.


react

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

A JMS proxy reacts to:

Throws:
UnknownNotificationException - If the notification is not expected.

deleteProxy

public void deleteProxy(AgentId from)
                 throws java.lang.Exception
This method deletes the proxy by notifying its connected clients, denying the non acknowledged messages, deleting the temporary destinations, removing the subscriptions.

Throws:
java.lang.Exception - If the requester is not an administrator.

getId

public AgentId getId()

readBag

public void readBag(java.io.ObjectInputStream in)
             throws java.io.IOException,
                    java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeBag

public void writeBag(java.io.ObjectOutputStream out)
              throws java.io.IOException
Throws:
java.io.IOException


Copyright ? 2004 Scalagent - All rights reserved