public class TcpRequestChannel extends Object implements RequestChannel
TcpConnection links a Joram client and a Joram platform
with a TCP socket.
Requests and replies travel through the socket after serialization.
| Modifier and Type | Field and Description |
|---|---|
private org.objectweb.joram.shared.security.Identity |
identity |
private static org.objectweb.util.monolog.api.Logger |
logger |
private ReliableTcpClient |
tcpClient |
| Constructor and Description |
|---|
TcpRequestChannel(FactoryParameters params,
org.objectweb.joram.shared.security.Identity identity)
Creates a
TcpConnection instance. |
TcpRequestChannel(FactoryParameters params,
org.objectweb.joram.shared.security.Identity identity,
String reliableClass)
Creates a
TcpConnection instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the TCP connection.
|
void |
closing() |
void |
connect() |
org.objectweb.joram.shared.security.Identity |
getIdentity() |
org.objectweb.joram.shared.client.AbstractJmsReply |
receive() |
void |
send(org.objectweb.joram.shared.client.AbstractJmsRequest request)
Sending a JMS request through the TCP connection.
|
void |
setTimer(Timer timer) |
String |
toString() |
private static org.objectweb.util.monolog.api.Logger logger
private ReliableTcpClient tcpClient
private org.objectweb.joram.shared.security.Identity identity
public TcpRequestChannel(FactoryParameters params, org.objectweb.joram.shared.security.Identity identity) throws jakarta.jms.JMSException
TcpConnection instance.params - Factory parameters.identity - jakarta.jms.JMSSecurityException - If the user identification is incorrect.jakarta.jms.IllegalStateException - If the server is not reachable.jakarta.jms.JMSExceptionpublic TcpRequestChannel(FactoryParameters params, org.objectweb.joram.shared.security.Identity identity, String reliableClass) throws jakarta.jms.JMSException
TcpConnection instance.params - Factory parameters.identity - reliableClass - reliable class name.jakarta.jms.JMSSecurityException - If the user identification is incorrect.jakarta.jms.IllegalStateException - If the server is not reachable.jakarta.jms.JMSExceptionpublic void setTimer(Timer timer)
setTimer in interface RequestChannelpublic void connect()
throws Exception
connect in interface RequestChannelExceptionpublic void send(org.objectweb.joram.shared.client.AbstractJmsRequest request)
throws Exception
send in interface RequestChanneljakarta.jms.IllegalStateException - If the connection is broken.Exceptionpublic org.objectweb.joram.shared.client.AbstractJmsReply receive()
throws Exception
receive in interface RequestChannelExceptionpublic void close()
close in interface RequestChannelpublic void closing()
closing in interface RequestChannelpublic org.objectweb.joram.shared.security.Identity getIdentity()
getIdentity in interface RequestChannelCopyright © 2023 ScalAgent D.T.. All rights reserved.