public interface ConnectionStateHandler
Title: Service Event Fabric Core
Description: Provides facilities for a processing of state changing of the Connection
.
Copyright: Copyright (c) 2009
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
PacketHandler |
getPacketHandler()
Returns a packet handler that processes incoming packets received by the connection.
|
void |
onClose(Connection connection,
boolean isNormal)
This method is invoked before the specified connection will be closed.
|
void |
onError(Connection connection,
FabricException exception)
This method will be invoked if the specified error occurs during a work of the specified connection.
|
void |
onOpen(Connection connection,
boolean isOutgoing)
This method will be immediately invoked after the specified connection is opened.
|
void onOpen(Connection connection, boolean isOutgoing) throws FabricException
connection
- the connection associated with the handler.isOutgoing
- the flag indicating if the connection is outgoing.FabricException
- if some error occurs.void onClose(Connection connection, boolean isNormal)
connection
- the connection associated with the handler.isNormal
- the flag indicating if the closing is normal.void onError(Connection connection, FabricException exception)
connection
- the connection associated with the handler.exception
- the occurred error.PacketHandler getPacketHandler()
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.