Package jade.imtp.leap.http
Class HTTPFEDispatcher
- java.lang.Object
-
- jade.imtp.leap.http.HTTPFEDispatcher
-
- All Implemented Interfaces:
FEConnectionManager,TimerListener,Dispatcher
- Direct Known Subclasses:
HTTPFESDispatcher
public class HTTPFEDispatcher extends Object implements FEConnectionManager, Dispatcher, TimerListener
FrontEnd-side dispatcher class using JICP over HTTP as transport protocol- Author:
- Giovanni Caire - TILAB
-
-
Field Summary
Fields Modifier and Type Field Description protected StringmyMediatorClass
-
Constructor Summary
Constructors Constructor Description HTTPFEDispatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]dispatch(byte[] payload, boolean flush, int oldSessionId)Dispatch a serialized command to the BackEnd and get back a serialized response.voiddoTimeOut(Timer t)BackEndgetBackEnd(FrontEnd fe, Properties p)Create a BackEnd in the fixed network and return a stub to communicate with itprotected ConnectiongetConnection(TransportAddress ta)voidshutdown()Make this HTTPFEDispatcher terminate.
-
-
-
Field Detail
-
myMediatorClass
protected String myMediatorClass
-
-
Method Detail
-
getBackEnd
public BackEnd getBackEnd(FrontEnd fe, Properties p) throws IMTPException
Create a BackEnd in the fixed network and return a stub to communicate with it- Specified by:
getBackEndin interfaceFEConnectionManager- Parameters:
fe- The FrontEnd container that is requesting the connection setup.p- Additional (implementation dependent) connection configuration properties.- Returns:
- A stub of the remote BackEnd.
- Throws:
IMTPException
-
shutdown
public void shutdown()
Make this HTTPFEDispatcher terminate. Note that when the BackEnd receives the termination notification (explicitly sent in case of a self-initiated shutdown or attached to the response to the EXIT command), it closes the input connection. The InputManager gets an exception and, since it has been killed, terminates.- Specified by:
shutdownin interfaceFEConnectionManager
-
dispatch
public byte[] dispatch(byte[] payload, boolean flush, int oldSessionId) throws ICPExceptionDispatch a serialized command to the BackEnd and get back a serialized response. Mutual exclusion with itself to preserve dispatching order- Specified by:
dispatchin interfaceDispatcher- Throws:
ICPException
-
getConnection
protected Connection getConnection(TransportAddress ta)
-
doTimeOut
public void doTimeOut(Timer t)
- Specified by:
doTimeOutin interfaceTimerListener
-
-