public class ClientSynchroMessageConnectionImpl extends Object implements ClientSynchroMessageConnection
| Constructor and Description |
|---|
ClientSynchroMessageConnectionImpl(MessageConnection mc,
SynchroCallback cb,
Map env) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this connection.
|
void |
connect(Map env)
Establish the connection.
|
MessageConnection |
getAsynchroConnection()
Returns the underlying asynchronous trasport.
|
String |
getConnectionId()
Returns this connection identifier.
|
void |
sendOneWay(Message msg)
Sends a message to the remote side and does not need a response.
|
Message |
sendWithReturn(Message msg)
Sends a message to the remote side and waits a response.
|
public ClientSynchroMessageConnectionImpl(MessageConnection mc, SynchroCallback cb, Map env)
public void connect(Map env) throws IOException
SynchroMessageConnectionEstablish the connection. This method must be called before any other method of this interface. The behavior is unspecified if not.
connect in interface SynchroMessageConnectionenv - the properties of the connection.IOException - if the connection cannot be made.public void sendOneWay(Message msg) throws IOException
SynchroMessageConnection1) sends out the message and gets return at once. For example, if the underlying protocol is asynchronous.
2) sends out the message and is blocked until arrival of a response. For example, if the underlying protocol supports only synchronous communication.
3) throws UnsupportedOperationException to tell the caller
that it is not supported by the implementation. For example, if the object is used
on a server side and it is not mandatory for the server to send a request spontaneously.
sendOneWay in interface SynchroMessageConnectionIOException - if a message could not be sent because of a communication problem.public Message sendWithReturn(Message msg) throws IOException
ClientSynchroMessageConnectionAn implementation can throw UnsupportedOperationException
to tell the caller that it is not supported. For example, if the object
is used on a server side and it is not mandatory for the server to send
a request spontaneously.
sendWithReturn in interface ClientSynchroMessageConnectionIOException - if a communication problem occures.public void close()
throws IOException
SynchroMessageConnectionclose in interface SynchroMessageConnectionIOExceptionpublic String getConnectionId()
SynchroMessageConnectiongetConnectionId in interface SynchroMessageConnectionpublic MessageConnection getAsynchroConnection()
Copyright © 2019 Terracotta, Inc.. All rights reserved.