Joram 5.0.8

org.objectweb.joram.client.jms.tcp
Class TcpConnection

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

public class TcpConnection
extends java.lang.Object
implements RequestChannel

A TcpConnection links a Joram client and a Joram platform with a TCP socket.

Requests and replies travel through the socket after serialization.


Constructor Summary
TcpConnection(FactoryParameters params, java.lang.String name, java.lang.String password)
          Creates a TcpConnection instance.
TcpConnection(FactoryParameters params, java.lang.String name, java.lang.String password, java.lang.String reliableClass)
          Creates a TcpConnection instance.
 
Method Summary
 void close()
          Closes the TCP connection.
 void connect()
           
 AbstractJmsReply receive()
           
 void send(AbstractJmsRequest request)
          Sending a JMS request through the TCP connection.
 void setTimer(java.util.Timer timer)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TcpConnection

public TcpConnection(FactoryParameters params,
                     java.lang.String name,
                     java.lang.String password)
              throws javax.jms.JMSException
Creates a TcpConnection instance.

Parameters:
params - Factory parameters.
name - Name of user.
password - Password of user.
Throws:
javax.jms.JMSSecurityException - If the user identification is incorrrect.
javax.jms.IllegalStateException - If the server is not reachable.
javax.jms.JMSException

TcpConnection

public TcpConnection(FactoryParameters params,
                     java.lang.String name,
                     java.lang.String password,
                     java.lang.String reliableClass)
              throws javax.jms.JMSException
Creates a TcpConnection instance.

Parameters:
params - Factory parameters.
name - Name of user.
password - Password of user.
reliableClass - reliable class name.
Throws:
javax.jms.JMSSecurityException - If the user identification is incorrrect.
javax.jms.IllegalStateException - If the server is not reachable.
javax.jms.JMSException
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 TCP connection.

Specified by:
send in interface RequestChannel
Throws:
javax.jms.IllegalStateException - If the connection is broken.
java.lang.Exception

receive

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

close

public void close()
Closes the TCP connection.

Specified by:
close in interface RequestChannel

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Joram 5.0.8

Copyright © 2005 Scalagent - All rights reserved