|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cuny.cat.comm.CallBasedCatpConnection
public class CallBasedCatpConnection
The implementation of Connection
when
CallBasedInfrastructureImpl
is used.
Field Summary | |
---|---|
protected java.lang.Object |
connector
the Connector that requested to create this connection |
protected java.lang.String |
id
an identifier for this connection |
protected ConnectionListener<CatpMessage> |
listener
object listening to the incoming messages |
protected CallBasedCatpConnection |
peer
the other side of the connection where outgoing messages go |
Constructor Summary | |
---|---|
CallBasedCatpConnection(java.lang.Object connector,
java.lang.String id)
|
Method Summary | |
---|---|
void |
close()
closes this connection. |
java.lang.Object |
getConnector()
|
ConnectionListener<CatpMessage> |
getListener()
|
java.lang.String |
getLocalAddressInfo()
|
CallBasedCatpConnection |
getPeer()
|
java.lang.String |
getRemoteAddressInfo()
|
boolean |
isClosed()
checks whether the connection is closed or not. |
void |
open()
opens the connection before sending or receiving any message. |
void |
relayMessage(CatpMessage msg)
|
void |
sendMessage(CatpMessage msg)
sends a Message through this connection. |
void |
setConnector(java.lang.Object connector)
|
void |
setListener(ConnectionListener<CatpMessage> listener)
|
void |
setPeer(CallBasedCatpConnection peer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ConnectionListener<CatpMessage> listener
protected java.lang.Object connector
Connector
that requested to create this connection
protected CallBasedCatpConnection peer
protected java.lang.String id
Constructor Detail |
---|
public CallBasedCatpConnection(java.lang.Object connector, java.lang.String id)
Method Detail |
---|
public java.lang.Object getConnector()
public void setConnector(java.lang.Object connector)
public CallBasedCatpConnection getPeer()
public void setPeer(CallBasedCatpConnection peer)
public void sendMessage(CatpMessage msg) throws CatException
Connection
Message
through this connection.
sendMessage
in interface Connection<CatpMessage>
msg
- message to be sent.
CatException
public void relayMessage(CatpMessage msg) throws CatException
CatException
public void setListener(ConnectionListener<CatpMessage> listener)
setListener
in interface ReactiveConnection<CatpMessage>
public ConnectionListener<CatpMessage> getListener()
getListener
in interface ReactiveConnection<CatpMessage>
public void open() throws ConnectionException
Connection
open
in interface Connection<CatpMessage>
ConnectionException
public void close() throws ConnectionException
Connection
close
in interface Connection<CatpMessage>
ConnectionException
public boolean isClosed()
Connection
isClosed
in interface Connection<CatpMessage>
public java.lang.String getLocalAddressInfo()
getLocalAddressInfo
in interface Connection<CatpMessage>
public java.lang.String getRemoteAddressInfo()
getRemoteAddressInfo
in interface Connection<CatpMessage>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |