xsul.dispatcher.msg.wsconnection
Class MSGWSConnection

java.lang.Object
  extended byxsul.dispatcher.routingtable.WSConnection
      extended byxsul.dispatcher.msg.wsconnection.MSGWSConnection
All Implemented Interfaces:
java.lang.Runnable

public class MSGWSConnection
extends WSConnection
implements java.lang.Runnable

Working like a FIFO queue to forward messages from clients to one WS.

Author:
Alexandre di Costanzo

Constructor Summary
MSGWSConnection(WS wsHttp)
          Create a new connection with the specified WS by wsHttp;
 
Method Summary
 void forwards(java.lang.Object[] request)
           Forwards a request from a client to the Web Service and the response.
 boolean isKeepAlive()
          Check if the conenction beetween the forwarder and the Web Sevice is keep alive.
 void put(XmlElement outMessage, java.lang.String arguments, SoapUtil soapUtil)
          Put outMessage and arguments in the FIFO queue to forward the message to the Web Service.
 void run()
          Forward message from the queue during all the time where the connection is alive.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSGWSConnection

public MSGWSConnection(WS wsHttp)
Create a new connection with the specified WS by wsHttp;

Parameters:
wsHttp - information about the WS.
Method Detail

run

public void run()
Forward message from the queue during all the time where the connection is alive.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

forwards

public void forwards(java.lang.Object[] request)
Description copied from class: WSConnection

Forwards a request from a client to the Web Service and the response.

Structure of the parameter request

Specified by:
forwards in class WSConnection
Parameters:
request - the request, response and arguments.
See Also:
WSConnection.forwards(java.lang.Object[])

isKeepAlive

public boolean isKeepAlive()
Check if the conenction beetween the forwarder and the Web Sevice is keep alive.

Returns:
true if the connection is keep alive, false else.

put

public void put(XmlElement outMessage,
                java.lang.String arguments,
                SoapUtil soapUtil)
         throws java.lang.InterruptedException
Put outMessage and arguments in the FIFO queue to forward the message to the Web Service.

Parameters:
outMessage - a valid WS-Addressing message.
arguments - from the HTTP request.
Throws:
java.lang.InterruptedException - if problems occur.


IU Extreme! Lab (http://www.extreme.indiana.edu)