Class SimpleServerChannel<T>
java.lang.Object
pt.unl.fct.di.novasys.channel.base.SingleThreadedChannel<T,Y>
pt.unl.fct.di.novasys.channel.base.SingleThreadedServerChannel<T,T>
pt.unl.fct.di.novasys.channel.simpleclientserver.SimpleServerChannel<T>
- All Implemented Interfaces:
IChannel<T>,AttributeValidator,InConnListener<T>,MessageListener<T>
public class SimpleServerChannel<T>
extends SingleThreadedServerChannel<T,T>
implements AttributeValidator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface pt.unl.fct.di.novasys.network.AttributeValidator
ALWAYS_VALID, CHANNEL_MAGIC_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionSimpleServerChannel(ISerializer<T> serializer, ChannelListener<T> list, Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidonDeliverMessage(T msg, Connection<T> conn) voidonServerSocketBind(boolean success, Throwable cause) voidonServerSocketClose(boolean success, Throwable cause) booleanvalidateAttributes(Attributes attr) Methods inherited from class pt.unl.fct.di.novasys.channel.base.SingleThreadedServerChannel
inboundConnectionDown, inboundConnectionUp, serverSocketBind, serverSocketCloseMethods inherited from class pt.unl.fct.di.novasys.channel.base.SingleThreadedChannel
closeConnection, deliverMessage, openConnection, sendMessage
-
Field Details
-
NAME
- See Also:
-
ADDRESS_KEY
- See Also:
-
PORT_KEY
- See Also:
-
WORKER_GROUP_KEY
- See Also:
-
HEARTBEAT_INTERVAL_KEY
- See Also:
-
HEARTBEAT_TOLERANCE_KEY
- See Also:
-
CONNECT_TIMEOUT_KEY
- See Also:
-
TRIGGER_SENT_KEY
- See Also:
-
DEFAULT_PORT
- See Also:
-
DEFAULT_HB_INTERVAL
- See Also:
-
DEFAULT_HB_TOLERANCE
- See Also:
-
DEFAULT_CONNECT_TIMEOUT
- See Also:
-
-
Constructor Details
-
SimpleServerChannel
public SimpleServerChannel(ISerializer<T> serializer, ChannelListener<T> list, Properties properties) throws UnknownHostException - Throws:
UnknownHostException
-
-
Method Details
-
onServerSocketBind
-
onServerSocketClose
-
onDeliverMessage
-
validateAttributes
- Specified by:
validateAttributesin interfaceAttributeValidator
-