|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.glines.socketio.client.jre.SocketIOConnectionImpl
public class SocketIOConnectionImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.glines.socketio.client.common.SocketIOConnection |
|---|
SocketIOConnection.Factory, SocketIOConnection.SocketIOConnectionListener |
| Constructor Summary | |
|---|---|
SocketIOConnectionImpl(SocketIOConnection.SocketIOConnectionListener listener,
String host,
short port)
|
|
| Method Summary | |
|---|---|
void |
close()
Initiate an orderly close of the connection. |
void |
connect()
Initiate a connection attempt. |
void |
disconnect()
Forcefully disconnect the connection, discarding any unsent messages. |
ConnectionState |
getConnectionState()
Return the current socket connection state. |
void |
sendMessage(int messageType,
String message)
Send a message. |
void |
sendMessage(String message)
Send a message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketIOConnectionImpl(SocketIOConnection.SocketIOConnectionListener listener,
String host,
short port)
| Method Detail |
|---|
public void connect()
SocketIOConnectiononConnect will be called. If the connection
attempt fails, then
onDisonnect will
be called.
connect in interface SocketIOConnectionpublic void close()
SocketIOConnection
close in interface SocketIOConnectionpublic void disconnect()
SocketIOConnection
disconnect in interface SocketIOConnectionpublic ConnectionState getConnectionState()
SocketIOConnection
getConnectionState in interface SocketIOConnection
public void sendMessage(String message)
throws SocketIOException
SocketIOConnection
sendMessage in interface SocketIOConnectionSocketIOException
public void sendMessage(int messageType,
String message)
throws SocketIOException
SocketIOConnection
sendMessage in interface SocketIOConnectionSocketIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||