public abstract class AbstractFlowFileServerProtocol extends Object implements ServerProtocol
| Modifier and Type | Field and Description |
|---|---|
protected static long |
DEFAULT_BATCH_NANOS |
protected boolean |
handshakeCompleted |
protected HandshakeProperties |
handshakeProperties |
protected org.slf4j.Logger |
logger |
protected org.apache.nifi.remote.codec.FlowFileCodec |
negotiatedFlowFileCodec |
protected PublicPort |
port |
protected ProcessGroup |
rootGroup |
protected boolean |
shutdown |
| Constructor and Description |
|---|
AbstractFlowFileServerProtocol() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRequestType, negotiateCodec, sendPeerListgetResourceName, getVersionNegotiatorprotected ProcessGroup rootGroup
protected PublicPort port
protected boolean handshakeCompleted
protected boolean shutdown
protected org.apache.nifi.remote.codec.FlowFileCodec negotiatedFlowFileCodec
protected HandshakeProperties handshakeProperties
protected static final long DEFAULT_BATCH_NANOS
protected final org.slf4j.Logger logger
public void setRootProcessGroup(ProcessGroup group)
setRootProcessGroup in interface ServerProtocolpublic boolean isHandshakeSuccessful()
isHandshakeSuccessful in interface ServerProtocolprotected void validateHandshakeRequest(HandshakeProperties confirmed, Peer peer, Map<String,String> properties) throws HandshakeException
HandshakeExceptionprotected void checkPortStatus(Peer peer, String portId) throws HandshakeException
HandshakeExceptionpublic PublicPort getPort()
getPort in interface ServerProtocolpublic org.apache.nifi.remote.codec.FlowFileCodec getPreNegotiatedCodec()
getPreNegotiatedCodec in interface ServerProtocolpublic final void handshake(Peer peer) throws IOException, HandshakeException
handshake in interface ServerProtocolIOExceptionHandshakeExceptionprotected abstract HandshakeProperties doHandshake(Peer peer) throws IOException, HandshakeException
IOExceptionHandshakeExceptionpublic int transferFlowFiles(Peer peer, ProcessContext context, ProcessSession session, org.apache.nifi.remote.codec.FlowFileCodec codec) throws IOException, ProtocolException
transferFlowFiles in interface ServerProtocolIOExceptionProtocolExceptionprotected int commitTransferTransaction(Peer peer, FlowFileTransaction transaction) throws IOException
IOExceptionprotected Response readTransactionResponse(boolean isTransfer, CommunicationsSession commsSession) throws IOException
IOExceptionprotected final void writeTransactionResponse(boolean isTransfer,
ResponseCode response,
CommunicationsSession commsSession)
throws IOException
IOExceptionprotected void writeTransactionResponse(boolean isTransfer,
ResponseCode response,
CommunicationsSession commsSession,
String explanation)
throws IOException
IOExceptionpublic int receiveFlowFiles(Peer peer, ProcessContext context, ProcessSession session, org.apache.nifi.remote.codec.FlowFileCodec codec) throws IOException, ProtocolException
receiveFlowFiles in interface ServerProtocolIOExceptionProtocolExceptionprotected int commitReceiveTransaction(Peer peer, FlowFileTransaction transaction) throws IOException
IOExceptionpublic void shutdown(Peer peer)
shutdown in interface ServerProtocolpublic boolean isShutdown()
isShutdown in interface ServerProtocolpublic void setNodeInformant(NodeInformant nodeInformant)
setNodeInformant in interface ServerProtocolpublic long getRequestExpiration()
getRequestExpiration in interface ServerProtocolCopyright © 2021 Apache NiFi Project. All rights reserved.