Class SingleThreadedChannel<T,Y>
java.lang.Object
pt.unl.fct.di.novasys.channel.base.SingleThreadedChannel<T,Y>
- All Implemented Interfaces:
IChannel<T>
,MessageListener<Y>
- Direct Known Subclasses:
SingleThreadedBiChannel
,SingleThreadedClientChannel
,SingleThreadedServerChannel
public abstract class SingleThreadedChannel<T,Y>
extends Object
implements IChannel<T>, MessageListener<Y>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
closeConnection
(Host peer, int connection) void
deliverMessage
(Y msg, Connection<Y> conn) Method that is called to deliver a message from the network layer to the applicationvoid
openConnection
(Host peer) void
sendMessage
(T msg, Host peer, int connection)
-
Constructor Details
-
SingleThreadedChannel
-
-
Method Details
-
sendMessage
- Specified by:
sendMessage
in interfaceIChannel<T>
-
closeConnection
- Specified by:
closeConnection
in interfaceIChannel<T>
-
deliverMessage
Description copied from interface:MessageListener
Method that is called to deliver a message from the network layer to the application- Specified by:
deliverMessage
in interfaceMessageListener<T>
- Parameters:
msg
- The received message
-
openConnection
- Specified by:
openConnection
in interfaceIChannel<T>
-