|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.wasync.impl.DefaultSocket
public class DefaultSocket
| Nested Class Summary | |
|---|---|
protected static class |
DefaultSocket.InternalSocket
|
| Nested classes/interfaces inherited from interface org.atmosphere.wasync.Socket |
|---|
Socket.EVENT |
| Constructor Summary | |
|---|---|
DefaultSocket(com.ning.http.client.AsyncHttpClient asyncHttpClient,
Options options)
|
|
| Method Summary | |
|---|---|
void |
close()
Close this Socket |
protected Socket |
connect(com.ning.http.client.RequestBuilder r,
List<Transport> transports)
|
Future |
fire(Object data)
Send data to the remote Server. |
protected List<Transport> |
getTransport(Request request)
|
protected DefaultSocket.InternalSocket |
internalSocket()
|
Socket |
on(Function<? extends Object> function)
Associate a Function with the Socket. |
Socket |
on(String functionName,
Function<? extends Object> function)
Associate a Function with the Socket. |
Socket |
open(Request request)
Connect to the remote Server using the Request's information. |
protected Request |
request()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSocket(com.ning.http.client.AsyncHttpClient asyncHttpClient,
Options options)
| Method Detail |
|---|
public Future fire(Object data)
throws IOException
Socket
fire in interface SocketFuture
IOExceptionpublic Socket on(Function<? extends Object> function)
SocketFunction with the Socket. When a response is received, the library will try to associated
the decoded message (decoded by Decoder) to the defined type of the Function
on in interface Socketfunction - a Function
public Socket on(String functionName,
Function<? extends Object> function)
SocketFunction with the Socket. When a response is received, the library will try to associated
the decoded message (decoded by Decoder) to the defined type of the Function. The default messages
are defined by Function.MESSAGE but handling of custom message can be done using a FunctionResolver
on in interface Socketfunction - a Function
public Socket open(Request request)
throws IOException
SocketRequest's information.
open in interface Socketrequest - a Request
IOException
protected Socket connect(com.ning.http.client.RequestBuilder r,
List<Transport> transports)
throws IOException
IOExceptionpublic void close()
Socket
close in interface Socketprotected DefaultSocket.InternalSocket internalSocket()
protected List<Transport> getTransport(Request request)
throws IOException
IOExceptionprotected Request request()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||