public class Pipe extends Object
Constructor and Description |
---|
Pipe(ControlledByteBuffer buffer,
String name,
BaseConfiguration baseConfig) |
Pipe(org.apache.http.nio.IOControl producerIoControl,
ControlledByteBuffer buffer,
String name,
BaseConfiguration baseConfig) |
Modifier and Type | Method and Description |
---|---|
void |
attachConsumer(org.apache.http.nio.IOControl consumerIoControl)
Set the consumers IOControl
|
int |
consume(org.apache.http.nio.ContentEncoder encoder)
Consume the data from the buffer.
|
void |
consumerError() |
void |
forceProducerComplete(org.apache.http.nio.ContentDecoder decoder)
Helper method to mark as producer completed.
|
void |
forceSetSerializationRest() |
ControlledByteBuffer |
getBuffer() |
InputStream |
getInputStream()
Creates an InputStream object on the underlying ByteBuffer.
|
OutputStream |
getOutputStream()
Creates a separate ByteBuffer for the output data and returns an OutputStream
on top of it.
|
boolean |
hasHttpProducer() |
boolean |
isConsumeRequired()
This method returns whether buffer consumption is required or not.
|
boolean |
isProducerCompleted() |
boolean |
isProducerError()
Checks the state of the producerError property
|
boolean |
isSerializationComplete() |
int |
produce(org.apache.http.nio.ContentDecoder decoder)
Produce data in to the buffer.
|
void |
producerError() |
OutputStream |
resetOutputStream()
Creates a separate ByteBuffer for the output data and returns an OutputStream
on top of it.
|
void |
setRawSerializationComplete(boolean rawSerializationComplete) |
void |
setSerializationComplete(boolean serializationComplete) |
void |
setSerializationCompleteWithoutData(boolean serializationComplete) |
String |
toString() |
public Pipe(org.apache.http.nio.IOControl producerIoControl, ControlledByteBuffer buffer, String name, BaseConfiguration baseConfig)
public Pipe(ControlledByteBuffer buffer, String name, BaseConfiguration baseConfig)
public boolean isProducerCompleted()
public void attachConsumer(org.apache.http.nio.IOControl consumerIoControl)
consumerIoControl
- IOControl of the consumerpublic int consume(org.apache.http.nio.ContentEncoder encoder) throws IOException
encoder
- encoder used to write the data means there will not be any data
written in to this bufferIOException
- if an error occurred while consuming datapublic int produce(org.apache.http.nio.ContentDecoder decoder) throws IOException
decoder
- decoder to read bytes from the underlying streamIOException
- if an error occurs while reading datapublic void forceProducerComplete(org.apache.http.nio.ContentDecoder decoder)
decoder
- decoder instance to consume inputpublic void consumerError()
public void producerError()
public InputStream getInputStream()
public OutputStream getOutputStream()
public OutputStream resetOutputStream()
public void setSerializationComplete(boolean serializationComplete)
public void setSerializationCompleteWithoutData(boolean serializationComplete)
public void setRawSerializationComplete(boolean rawSerializationComplete)
public void forceSetSerializationRest()
public boolean isSerializationComplete()
public ControlledByteBuffer getBuffer()
public boolean hasHttpProducer()
public boolean isConsumeRequired() throws IOException
IOException
public boolean isProducerError()
Copyright © 2005–2019 Apache Software Foundation. All rights reserved.