org.objectweb.joram.client.jms.soap
Class SoapRequestChannel

java.lang.Object
  extended by org.objectweb.joram.client.jms.soap.SoapRequestChannel
All Implemented Interfaces:
RequestChannel

public class SoapRequestChannel
extends java.lang.Object
implements RequestChannel

A SoapConnection links a Joram client and a Joram platform with HTTP connections.

Requests and replies travel through the connections in SOAP (XML) format.


Field Summary
private  boolean closing
           
private  int cnxId
          Identifier of the connection.
private  FactoryParameters factParams
          The factory parameters to configure the connection
private  Identity identity
          The user's identity for authentication
private  org.apache.soap.rpc.Call receiveCall
           
private  org.apache.soap.rpc.Call sendCall
          SOAP call object for sending the requests.
private  java.net.URL serviceUrl
          URL of the SOAP service this object communicates with.
 
Constructor Summary
SoapRequestChannel(FactoryParameters params, Identity identity)
          Creates a SoapConnection instance.
 
Method Summary
 void close()
          Closes the SoapConnection.
 void closing()
           
 void connect()
           
private  void connect(FactoryParameters factParams, Identity identity)
          Actually tries to set a first SOAP connection with the server.
 AbstractJmsReply receive()
           
 void send(AbstractJmsRequest request)
          Sending a JMS request through the SOAP protocol.
 void setTimer(java.util.Timer timer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identity

private Identity identity
The user's identity for authentication


factParams

private FactoryParameters factParams
The factory parameters to configure the connection


serviceUrl

private java.net.URL serviceUrl
URL of the SOAP service this object communicates with.


sendCall

private org.apache.soap.rpc.Call sendCall
SOAP call object for sending the requests.


receiveCall

private org.apache.soap.rpc.Call receiveCall

cnxId

private int cnxId
Identifier of the connection.


closing

private boolean closing
Constructor Detail

SoapRequestChannel

public SoapRequestChannel(FactoryParameters params,
                          Identity identity)
Creates a SoapConnection instance.

Parameters:
params - The factory parameters to configure the connection.
identity - The user's identity for authentication.
Throws:
javax.jms.JMSSecurityException - If the user identification is incorrect.
javax.jms.IllegalStateException - If the server is not reachable.
Method Detail

setTimer

public void setTimer(java.util.Timer timer)
Specified by:
setTimer in interface RequestChannel

connect

public void connect()
             throws java.lang.Exception
Specified by:
connect in interface RequestChannel
Throws:
java.lang.Exception

send

public void send(AbstractJmsRequest request)
          throws java.lang.Exception
Sending a JMS request through the SOAP protocol.

Specified by:
send in interface RequestChannel
Throws:
javax.jms.IllegalStateException - If the SOAP service fails.
java.lang.Exception

close

public void close()
Closes the SoapConnection.

Specified by:
close in interface RequestChannel

connect

private void connect(FactoryParameters factParams,
                     Identity identity)
              throws javax.jms.JMSException
Actually tries to set a first SOAP connection with the server.

Parameters:
params - Factory parameters.
identity - identity.
Throws:
javax.jms.JMSSecurityException - If the user identification is incorrect.
javax.jms.IllegalStateException - If the SOAP service fails.
javax.jms.JMSException

receive

public AbstractJmsReply receive()
                         throws java.lang.Exception
Specified by:
receive in interface RequestChannel
Throws:
java.lang.Exception

closing

public void closing()
Specified by:
closing in interface RequestChannel


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.