|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ws.rs.core.GenericType<T>
org.glassfish.jersey.server.ChunkedOutput<T>
T - chunk type.public class ChunkedOutput<T>
Used for sending messages in "typed" chunks. Useful for long running processes, which needs to produce partial responses.
| Constructor Summary | |
|---|---|
protected |
ChunkedOutput()
Create new ChunkedOutput. |
protected |
ChunkedOutput(byte[] chunkDelimiter)
Create new ChunkedOutput with a custom chunk delimiter. |
protected |
ChunkedOutput(String chunkDelimiter)
Create new ChunkedOutput with a custom chunk delimiter. |
|
ChunkedOutput(Type chunkType)
Create ChunkedOutput with specified type. |
|
ChunkedOutput(Type chunkType,
byte[] chunkDelimiter)
Create new ChunkedOutput with a custom chunk delimiter. |
|
ChunkedOutput(Type chunkType,
String chunkDelimiter)
Create new ChunkedOutput with a custom chunk delimiter. |
| Method Summary | |
|---|---|
void |
close()
Close this response - it will be finalized and underlying connections will be closed or made available for another response. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
boolean |
isClosed()
Get state information. |
String |
toString()
|
void |
write(T chunk)
Write a chunk. |
| Methods inherited from class javax.ws.rs.core.GenericType |
|---|
getRawType, getType |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ChunkedOutput()
ChunkedOutput.
public ChunkedOutput(Type chunkType)
ChunkedOutput with specified type.
chunkType - chunk type. Must not be {code null}.protected ChunkedOutput(byte[] chunkDelimiter)
ChunkedOutput with a custom chunk delimiter.
chunkDelimiter - custom chunk delimiter bytes. Must not be {code null}.
public ChunkedOutput(Type chunkType,
byte[] chunkDelimiter)
ChunkedOutput with a custom chunk delimiter.
chunkType - chunk type. Must not be {code null}.chunkDelimiter - custom chunk delimiter bytes. Must not be {code null}.protected ChunkedOutput(String chunkDelimiter)
ChunkedOutput with a custom chunk delimiter.
chunkDelimiter - custom chunk delimiter string. Must not be {code null}.
public ChunkedOutput(Type chunkType,
String chunkDelimiter)
ChunkedOutput with a custom chunk delimiter.
chunkType - chunk type. Must not be {code null}.chunkDelimiter - custom chunk delimiter string. Must not be {code null}.| Method Detail |
|---|
public void write(T chunk)
throws IOException
chunk - a chunk instance to be written.
IOException - if this response is closed or when encountered any problem during serializing or writing a chunk.
public void close()
throws IOException
close in interface CloseableIOExceptionpublic boolean isClosed()
ChunkedOutput can be closed by the client side - client can close connection
from its side.
public boolean equals(Object obj)
equals in class javax.ws.rs.core.GenericType<T>public int hashCode()
hashCode in class javax.ws.rs.core.GenericType<T>public String toString()
toString in class javax.ws.rs.core.GenericType<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||