public interface FredPluginFCPMessageHandler
FredPluginFCP
API meanwhile.FCPPluginConnection
must implement this interface by implementing one of it's child
interfaces, to provide a function which handles the received messages.FredPluginFCPMessageHandler.ClientSideFCPMessageHandler
and
FredPluginFCPMessageHandler.ServerSideFCPMessageHandler
do not provide any different functions.FredPluginFCPMessageHandler.PrioritizedMessageHandler
.FredPluginFCP
and FredPluginTalker
message handler
interfaces, and their PluginReplySender
and PluginTalker
message sending
counterparts, this new API is as symmetric as possible:FredPluginFCPMessageHandler
and
FCPPluginConnection
.FredPluginFCPMessageHandler.ServerSideFCPMessageHandler
at your plugin's main class.PluginRespirator.connectToOtherPlugin(String,
FredPluginFCPMessageHandler.ClientSideFCPMessageHandler)
to connect to a FCP server plugin.
Logger
to log "freenet.clients.fcp.FCPPluginConnection:DEBUG" to
cause logging of all sent and received messages.FCPPluginConnection.sendSynchronous(SendDirection, FCPPluginMessage, long)
will not
deliver replies to the message handler but only return them instead.Modifier and Type | Interface and Description |
---|---|
static interface |
FredPluginFCPMessageHandler.ClientSideFCPMessageHandler
Client plugins which connect to a FCP server plugin must implement this interface.
The purpose of this interface is to provide a message handling function for processing messages received from the server. |
static interface |
FredPluginFCPMessageHandler.PrioritizedMessageHandler
Implement this to specify a thread priority of threads which are used to
execute the message handling function
handlePluginFCPMessage(FCPPluginConnection,
FCPPluginMessage) .Notice that the priority could even be specified depending on the type of individual messages as the individual messages are passed to the implementation of this handler. |
static interface |
FredPluginFCPMessageHandler.ServerSideFCPMessageHandler
Plugins which provide FCP services to clients must implement this interface.
The purpose of this interface is to provide a message handling function for processing messages received from the clients. |
Modifier and Type | Method and Description |
---|---|
FCPPluginMessage |
handlePluginFCPMessage(FCPPluginConnection connection,
FCPPluginMessage message)
Message handling function for messages received from a plugin FCP server or client.
ATTENTION: Please read the different constraints for server and client side message handlers at the child interfaces: - FredPluginFCPMessageHandler.ServerSideFCPMessageHandler.handlePluginFCPMessage(FCPPluginConnection,
FCPPluginMessage) - FredPluginFCPMessageHandler.ClientSideFCPMessageHandler.handlePluginFCPMessage(FCPPluginConnection,
FCPPluginMessage) To stress those different constraints, you should also not implement this interface but one of the child interfaces FredPluginFCPMessageHandler.ServerSideFCPMessageHandler and
FredPluginFCPMessageHandler.ClientSideFCPMessageHandler . |
FCPPluginMessage handlePluginFCPMessage(FCPPluginConnection connection, FCPPluginMessage message)
FredPluginFCPMessageHandler.ServerSideFCPMessageHandler.handlePluginFCPMessage(FCPPluginConnection,
FCPPluginMessage)
FredPluginFCPMessageHandler.ClientSideFCPMessageHandler.handlePluginFCPMessage(FCPPluginConnection,
FCPPluginMessage)
FredPluginFCPMessageHandler.ServerSideFCPMessageHandler
and
FredPluginFCPMessageHandler.ClientSideFCPMessageHandler
.