edu.cuny.cat.comm
Interface ReactiveConnection<M extends Message>

Type Parameters:
M - the type of messages that can be transmitted through the connection.
All Superinterfaces:
Connection<M>
All Known Subinterfaces:
ReactiveCatpConnection
All Known Implementing Classes:
CallBasedCatpConnection, ListenableConnection

public interface ReactiveConnection<M extends Message>
extends Connection<M>

A reactive CatpMessage I/O interface for a catp client or server to communicate with other game players. It needs a listener to register in advance and the listener later on will receive messages automatically.

Note that here reactive means this connection can be accessed reactively rather than proactively.

Version:
$Revision: 1.2 $
Author:
Jinzhong Niu
See Also:
ProactiveConnection

Method Summary
 ConnectionListener<M> getListener()
           
 void setListener(ConnectionListener<M> listener)
           
 
Methods inherited from interface edu.cuny.cat.comm.Connection
close, getLocalAddressInfo, getRemoteAddressInfo, isClosed, open, sendMessage
 

Method Detail

setListener

void setListener(ConnectionListener<M> listener)

getListener

ConnectionListener<M> getListener()