|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.toremote.gateway.client.ClientManager
public class ClientManager
Used to manage session on gateway, you can use ClientManager.getInstance() to get the instance and manage sessions on gateway.
Field Summary | |
---|---|
(package private) java.util.Map<java.lang.String,com.toremote.websocket.handler.AbstractSessionHandler> |
clients
|
(package private) java.util.List<ThumbnailListenerInteface> |
thumbnailListeners
|
Method Summary | |
---|---|
void |
addClient(java.lang.String id,
com.toremote.websocket.handler.AbstractSessionHandler handler)
add session, session implements AbstractSessionHandler will be automatically added |
void |
addThumbnailListener(ThumbnailListenerInteface tli)
used for getting thumbnails from client side. |
HandlerInterface |
getHandler(java.lang.String id)
|
int |
getId()
|
static ClientManager |
getInstance()
|
java.util.Set<java.lang.Integer> |
getNumericIds()
|
java.lang.String |
getSessionIdByNumericId(int numericId)
|
java.util.Set<java.lang.String> |
getSessionIds()
|
SessionInformation |
getSessionInfo(int numericId)
|
SessionInformation |
getSessionInfo(java.lang.String id)
|
int |
getTotalClients()
|
void |
processTumbnail(java.lang.String sessionId,
java.lang.String thumbnail)
|
void |
removeClient(java.lang.String id)
remove session, this doesn't close the session. |
void |
removeThumbnailListener(ThumbnailListenerInteface tli)
remove thumbnail listener |
boolean |
terminateSession(java.lang.String id)
Close the session |
java.lang.String |
toJson(java.lang.String callback)
|
java.lang.String |
toJsonTable()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.util.Map<java.lang.String,com.toremote.websocket.handler.AbstractSessionHandler> clients
java.util.List<ThumbnailListenerInteface> thumbnailListeners
Method Detail |
---|
public int getId()
public void addClient(java.lang.String id, com.toremote.websocket.handler.AbstractSessionHandler handler) throws java.lang.Exception
id
- handler
-
java.lang.Exception
public void removeClient(java.lang.String id)
id
- public static final ClientManager getInstance()
public HandlerInterface getHandler(java.lang.String id)
id
-
public int getTotalClients()
public java.lang.String toJson(java.lang.String callback)
callback
-
public java.lang.String toJsonTable()
public java.util.Set<java.lang.String> getSessionIds()
getSessionIds
in interface SessionReaderInterface
public java.util.Set<java.lang.Integer> getNumericIds()
getNumericIds
in interface SessionReaderInterface
public SessionInformation getSessionInfo(java.lang.String id)
getSessionInfo
in interface SessionReaderInterface
id
- GUID
SessionInformation
public SessionInformation getSessionInfo(int numericId)
getSessionInfo
in interface SessionReaderInterface
SessionInformation
public boolean terminateSession(java.lang.String id)
SessionWriterInterface
terminateSession
in interface SessionWriterInterface
id
- GUID
public void processTumbnail(java.lang.String sessionId, java.lang.String thumbnail)
public void addThumbnailListener(ThumbnailListenerInteface tli)
SessionWriterInterface
addThumbnailListener
in interface SessionWriterInterface
ThumbnailListenerInteface
public void removeThumbnailListener(ThumbnailListenerInteface tli)
SessionWriterInterface
removeThumbnailListener
in interface SessionWriterInterface
tli
- listenerThumbnailListenerInteface
public java.lang.String getSessionIdByNumericId(int numericId)
getSessionIdByNumericId
in interface SessionReaderInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |