Package org.apache.nifi.remote.io.http
Class HttpCommunicationsSession
java.lang.Object
org.apache.nifi.remote.AbstractCommunicationsSession
org.apache.nifi.remote.io.http.HttpCommunicationsSession
- All Implemented Interfaces:
Closeable
,AutoCloseable
,CommunicationsSession
- Direct Known Subclasses:
HttpServerCommunicationsSession
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
private String
protected final HttpInput
protected final HttpOutput
protected int
Fields inherited from interface org.apache.nifi.remote.protocol.CommunicationsSession
MAGIC_BYTES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
createTransitUri
(String communicantUrl, String sourceFlowFileIdentifier) long
long
getInput()
int
void
Asynchronously interrupts this FlowFileCodec.boolean
isClosed()
boolean
void
setChecksum
(String checksum) void
setDataTransferUrl
(String dataTransferUrl) void
setTimeout
(int millis) Methods inherited from class org.apache.nifi.remote.AbstractCommunicationsSession
getUserDn, setUserDn
-
Field Details
-
timeout
protected int timeout -
input
-
output
-
checksum
-
dataTransferUrl
-
-
Constructor Details
-
HttpCommunicationsSession
public HttpCommunicationsSession()
-
-
Method Details
-
setTimeout
- Throws:
IOException
-
getTimeout
- Throws:
IOException
-
getInput
-
getOutput
-
isDataAvailable
public boolean isDataAvailable() -
getBytesWritten
public long getBytesWritten() -
getBytesRead
public long getBytesRead() -
interrupt
public void interrupt()Description copied from interface:CommunicationsSession
Asynchronously interrupts this FlowFileCodec. Implementations must ensure that they stop sending and receiving data as soon as possible after this method has been called, even if doing so results in sending only partial data to the peer. This will usually result in the peer throwing a SocketTimeoutException. -
isClosed
public boolean isClosed()- Returns:
true
if the connection is closed,false
otherwise
-
close
- Throws:
IOException
-
getChecksum
-
setChecksum
-
setDataTransferUrl
- Parameters:
dataTransferUrl
- Set data transfer url to use as provenance event transit url.
-
createTransitUri
- Specified by:
createTransitUri
in interfaceCommunicationsSession
- Overrides:
createTransitUri
in classAbstractCommunicationsSession
- Parameters:
communicantUrl
- Communicant's url that this session is assigned to.sourceFlowFileIdentifier
- Source Flow-file's uuid.- Returns:
- A transit uri to be used in a provenance event.
-