FCPPluginConnection
API instead.@Deprecated
public abstract class PluginReplySender
extends java.lang.Object
Constructor and Description |
---|
PluginReplySender(java.lang.String pluginname2,
java.lang.String clientIdentifier,
java.lang.String clientSideIdentifier)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConnectionIdentifier()
Deprecated.
Gets an unique identifier of the connection to the client.
|
java.lang.String |
getIdentifier()
Deprecated.
|
java.lang.String |
getPluginName()
Deprecated.
|
void |
send(SimpleFieldSet params)
Deprecated.
|
abstract void |
send(SimpleFieldSet params,
Bucket bucket)
Deprecated.
|
void |
send(SimpleFieldSet params,
byte[] data)
Deprecated.
|
public PluginReplySender(java.lang.String pluginname2, java.lang.String clientIdentifier, java.lang.String clientSideIdentifier)
clientIdentifier
- Identifier of the particular network connection to the client. Should be a random UUID chosen for each network connection.clientSideIdentifier
- Specified by the client through FCP via the "Identifier" field. As the client can specify this freely, it is not sufficient
as an ID. Thats why there also is another parameter clientIdentifier.public java.lang.String getPluginName()
public java.lang.String getIdentifier()
getConnectionIdentifier()
.public void send(SimpleFieldSet params) throws PluginNotFoundException
PluginNotFoundException
public void send(SimpleFieldSet params, byte[] data) throws PluginNotFoundException
PluginNotFoundException
public abstract void send(SimpleFieldSet params, Bucket bucket) throws PluginNotFoundException
PluginNotFoundException
public final java.lang.String getConnectionIdentifier()
Gets an unique identifier of the connection to the client.
Notice: The client can cause one network connection to appear with different connection IDs by setting a different Identifier field in
the contents of multiple FCP messages: The Identifier set by the client is part of the returned connection ID. See getIdentifier()
.
This allows you to identify whether two PluginReplySender objects which you received through multiple callbacks of
FredPluginFCP.handle(PluginReplySender, SimpleFieldSet, Bucket, int)
belong to the same client connection:
If the connection is the same, and the FCP field Identifier by the client is the same, the return value of this function is
String.equals(Object)
.
If the return value is not equals(), then the PlugplinReplySenders belong to a different client, to a different connection of the same client, or
to a different Identifier specified by the client.
This mechanism is necessary because the FCPConnectionInputHandler
will create a fresh PluginReplySender for each message it receives from
the same client.
Therefore, object identity of the PluginReplySender is not sufficient for identifying connections.
(Actually it creates a fresh FCPPluginClientMessage
for every processed message,
which in turn creates a fresh PluginTalker
, which then creates a fresh
PluginReplySender).