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 TypeMethodDescriptionvoidcloseConnection(Host peer, int connection) voiddeliverMessage(Y msg, Connection<Y> conn) Method that is called to deliver a message from the network layer to the applicationvoidopenConnection(Host peer) voidsendMessage(T msg, Host peer, int connection)
-
Constructor Details
-
SingleThreadedChannel
-
-
Method Details
-
sendMessage
- Specified by:
sendMessagein interfaceIChannel<T>
-
closeConnection
- Specified by:
closeConnectionin interfaceIChannel<T>
-
deliverMessage
Description copied from interface:MessageListenerMethod that is called to deliver a message from the network layer to the application- Specified by:
deliverMessagein interfaceMessageListener<T>- Parameters:
msg- The received message
-
openConnection
- Specified by:
openConnectionin interfaceIChannel<T>
-