|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.wasync.transport.StreamTransport
public class StreamTransport
Streaming Transport implementation
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.ning.http.client.AsyncHandler |
|---|
com.ning.http.client.AsyncHandler.STATE |
| Field Summary | |
|---|---|
protected String |
charSet
|
protected AtomicBoolean |
closed
|
protected Future |
connectdFuture
|
protected List<Decoder<? extends Object,?>> |
decoders
|
protected AtomicBoolean |
errorHandled
|
protected List<FunctionWrapper> |
functions
|
protected boolean |
isBinary
|
protected Options |
options
|
protected boolean |
protocolEnabled
|
protected boolean |
protocolReceived
|
protected Request |
request
|
protected com.ning.http.client.RequestBuilder |
requestBuilder
|
protected FunctionResolver |
resolver
|
protected Socket.STATUS |
status
|
protected com.ning.http.client.ListenableFuture |
underlyingFuture
|
| Constructor Summary | |
|---|---|
StreamTransport(com.ning.http.client.RequestBuilder requestBuilder,
Options options,
Request request,
List<FunctionWrapper> functions)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the underlying transport} |
void |
connectedFuture(Future f)
Set the Future, which will unlock the Socket.fire(java.lang.Object) method once the connection has been fully established. |
void |
error(Throwable t)
Set a Throwable |
boolean |
errorHandled()
Error handled by a Function |
void |
future(com.ning.http.client.ListenableFuture f)
Set the ListenableFuture, which can be used to clone the connection. |
Request.TRANSPORT |
name()
The transport name |
com.ning.http.client.AsyncHandler.STATE |
onBodyPartReceived(com.ning.http.client.HttpResponseBodyPart bodyPart)
|
String |
onCompleted()
|
com.ning.http.client.AsyncHandler.STATE |
onHeadersReceived(com.ning.http.client.HttpResponseHeaders headers)
|
com.ning.http.client.AsyncHandler.STATE |
onStatusReceived(com.ning.http.client.HttpResponseStatus responseStatus)
|
void |
onThrowable(Throwable t)
Called when an unexpected exception ocurred. |
Transport |
registerF(FunctionWrapper function)
Register a new FunctionResolver |
Socket.STATUS |
status()
Return the current Socket.STATUS |
protected static boolean |
whiteSpace(byte[] b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final List<FunctionWrapper> functions
protected final List<Decoder<? extends Object,?>> decoders
protected String charSet
protected final FunctionResolver resolver
protected final Options options
protected final com.ning.http.client.RequestBuilder requestBuilder
protected final Request request
protected final AtomicBoolean closed
protected final boolean isBinary
protected Socket.STATUS status
protected final AtomicBoolean errorHandled
protected com.ning.http.client.ListenableFuture underlyingFuture
protected boolean protocolReceived
protected Future connectdFuture
protected final boolean protocolEnabled
| Constructor Detail |
|---|
public StreamTransport(com.ning.http.client.RequestBuilder requestBuilder,
Options options,
Request request,
List<FunctionWrapper> functions)
| Method Detail |
|---|
public Transport registerF(FunctionWrapper function)
FunctionResolver
registerF in interface Transportfunction - FunctionResolver
public void onThrowable(Throwable t)
onThrowable in interface com.ning.http.client.AsyncHandler<String>onThrowable in interface Transportt - a Throwable
public com.ning.http.client.AsyncHandler.STATE onBodyPartReceived(com.ning.http.client.HttpResponseBodyPart bodyPart)
throws Exception
onBodyPartReceived in interface com.ning.http.client.AsyncHandler<String>Exception
public com.ning.http.client.AsyncHandler.STATE onHeadersReceived(com.ning.http.client.HttpResponseHeaders headers)
throws Exception
onHeadersReceived in interface com.ning.http.client.AsyncHandler<String>Exception
public com.ning.http.client.AsyncHandler.STATE onStatusReceived(com.ning.http.client.HttpResponseStatus responseStatus)
throws Exception
onStatusReceived in interface com.ning.http.client.AsyncHandler<String>Exception
public String onCompleted()
throws Exception
onCompleted in interface com.ning.http.client.AsyncHandler<String>Exceptionpublic Request.TRANSPORT name()
name in interface Transportpublic void close()
close in interface Transportpublic Socket.STATUS status()
Socket.STATUS
status in interface Transportpublic boolean errorHandled()
Function
errorHandled in interface Transportpublic void error(Throwable t)
Throwable
error in interface Transportt - Throwablepublic void future(com.ning.http.client.ListenableFuture f)
ListenableFuture, which can be used to clone the connection.
future in interface Transportf - ListenableFuturepublic void connectedFuture(Future f)
TransportFuture, which will unlock the Socket.fire(java.lang.Object) method once the connection has been fully established.
connectedFuture in interface Transportf - Futureprotected static final boolean whiteSpace(byte[] b)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||