public final class WSCSession extends Object
CallPackage
in order to process the message.Modifier and Type | Class and Description |
---|---|
static class |
WSCSession.Builder
Builder for WSCSession class.
|
static interface |
WSCSession.ConnectionCallback
Callback for connection notification.
|
static class |
WSCSession.Observer
Observer for session state change.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROP_ACK_INTERVAL
Integer property in milliseconds for message ACK interval.
|
static String |
PROP_BUSY_PING_INTERVAL
Integer property in milliseconds for busy ping interval.
|
static String |
PROP_IDLE_PING_INTERVAL
Integer property in milliseconds for idle ping interval.
|
static String |
PROP_RECONNECT_INTERVAL
Integer property in milliseconds for reconnect interval.
|
static String |
PROP_RECONNECT_TIME
Integer property in milliseconds for reconnect time.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the session.
|
String |
generateCorrelationId()
Generate a correlation ID based on current outbound sequence number of this session.
For example, if the current outbound sequence number is 100, "c101" is returned by calling this method. |
String |
generateSubSessionId()
Generates random UUID according to RFC 4122 v4.
|
IceServerConfig |
getIceServerConfig()
Gets the ICE server handler.
|
long |
getLastActiveTime() |
Package |
getPackage(String packageType)
Gets the package.
|
Collection |
getPackages()
Gets the packages.
|
Object |
getProperty(String name)
Gets a property.
|
String |
getSessionId()
Gets the session id.
|
SessionState |
getSessionState()
Gets the session state.
|
SubSession |
getSubSession(String id)
Gets the subsession.
|
Collection |
getSubSessions()
Gets the subsessions.
|
List |
getSystemIceServers()
Gets system ICE servers.
|
String |
getUserName()
Gets the user name.
|
void |
hibernate(HibernateParams params)
Initiates a hibernate request towards the server.
|
boolean |
isSessionClosed()
Checks if the session is in one of the Closed state.
|
void |
putSubSession(SubSession subSession)
Adds a sub session to WSCSession.
|
void |
removeSubSession(String id)
Removes a sub session from WSCSession.
|
void |
sendMessage(Frame message)
Sends the message to WebRTC Session Controller server over a WebSocket.
|
String |
suspend()
Suspends wsc session.
|
String |
toString() |
public static final String PROP_ACK_INTERVAL
public static final String PROP_BUSY_PING_INTERVAL
public static final String PROP_IDLE_PING_INTERVAL
public static final String PROP_RECONNECT_INTERVAL
public static final String PROP_RECONNECT_TIME
public Package getPackage(String packageType)
packageType
- the package typepublic Collection getPackages()
public void sendMessage(Frame message)
message
- A json messagepublic void putSubSession(SubSession subSession)
subSession
- Sub sessionpublic void removeSubSession(String id)
id
- Sub session identifierpublic SubSession getSubSession(String id)
id
- the idpublic Collection getSubSessions()
public String generateCorrelationId()
public String generateSubSessionId()
public String getUserName()
public IceServerConfig getIceServerConfig()
public List getSystemIceServers()
public String getSessionId()
public long getLastActiveTime()
public SessionState getSessionState()
public void hibernate(HibernateParams params)
params
- hibernation paramspublic boolean isSessionClosed()
public void close()
public Object getProperty(String name)
name
- Property namepublic String suspend()