public interface ServerProtocol extends VersionedRemoteResource
Modifier and Type | Method and Description |
---|---|
RootGroupPort |
getPort() |
FlowFileCodec |
getPreNegotiatedCodec() |
long |
getRequestExpiration() |
RequestType |
getRequestType(Peer peer)
Reads the Request Type of the next request from the Peer
|
void |
handshake(Peer peer)
Receives the handshake from the Peer
|
boolean |
isHandshakeSuccessful() |
boolean |
isShutdown() |
FlowFileCodec |
negotiateCodec(Peer peer)
Negotiates the FlowFileCodec that is to be used for transferring
FlowFiles
|
int |
receiveFlowFiles(Peer peer,
ProcessContext context,
ProcessSession session,
FlowFileCodec codec)
Receives FlowFiles from the specified peer
|
void |
sendPeerList(Peer peer,
java.util.Optional<ClusterNodeInformation> clusterNodeInfo,
NodeInformation self)
Sends a list of all nodes in the cluster to the specified peer.
|
void |
setNodeInformant(NodeInformant nodeInformant)
Optional operation.
|
void |
setRootProcessGroup(ProcessGroup rootGroup) |
void |
shutdown(Peer peer) |
int |
transferFlowFiles(Peer peer,
ProcessContext context,
ProcessSession session,
FlowFileCodec codec)
Sends FlowFiles to the specified peer
|
getResourceName, getVersionNegotiator
void setRootProcessGroup(ProcessGroup rootGroup)
rootGroup
- groupRootGroupPort getPort()
void setNodeInformant(NodeInformant nodeInformant)
nodeInformant
- informantvoid handshake(Peer peer) throws java.io.IOException, HandshakeException
peer
- peerjava.io.IOException
- ioeHandshakeException
- heboolean isHandshakeSuccessful()
true
if the handshaking process was completed
successfully, false
if either the handshaking process has
not happened or the handshake failedFlowFileCodec negotiateCodec(Peer peer) throws java.io.IOException, ProtocolException
peer
- peerjava.io.IOException
- ioeProtocolException
- peFlowFileCodec getPreNegotiatedCodec()
RequestType getRequestType(Peer peer) throws java.io.IOException
peer
- peerjava.io.IOException
- ioeint transferFlowFiles(Peer peer, ProcessContext context, ProcessSession session, FlowFileCodec codec) throws java.io.IOException, ProtocolException
peer
- peercontext
- contextsession
- sessioncodec
- codecjava.io.IOException
- ioeProtocolException
- peint receiveFlowFiles(Peer peer, ProcessContext context, ProcessSession session, FlowFileCodec codec) throws java.io.IOException, ProtocolException
peer
- peercontext
- contextsession
- sessioncodec
- codecjava.io.IOException
- ioeProtocolException
- pelong getRequestExpiration()
void sendPeerList(Peer peer, java.util.Optional<ClusterNodeInformation> clusterNodeInfo, NodeInformation self) throws java.io.IOException
peer
- peerclusterNodeInfo
- the cluster informationself
- the node which received the requestjava.io.IOException
- ioevoid shutdown(Peer peer)
boolean isShutdown()