public static class WSCSession.Builder extends Object
Modifier and Type | Method and Description |
---|---|
WSCSession |
build()
Build a session which will start the connection process.
|
static WSCSession.Builder |
create(URI webSocketURI)
Creates a new
WSCSession.Builder . |
WSCSession.Builder |
withConnectionCallback(WSCSession.ConnectionCallback value)
With connection callback listener.
|
WSCSession.Builder |
withContext(Object context)
With android application Context.
|
WSCSession.Builder |
withDeviceToken(String token)
With device token obtained from GCM.
|
WSCSession.Builder |
withExtHeaders(Map value)
With extension headers which will be sent as part of session connect.
|
WSCSession.Builder |
withHibernationHandler(HibernationHandler handler)
With hibernation handler.
|
WSCSession.Builder |
withHttpContext(HttpContext value)
With HTTP context.
|
WSCSession.Builder |
withIceServerConfig(IceServerConfig config)
With ICE server configuration.
|
WSCSession.Builder |
withObserver(WSCSession.Observer value)
With observer.
|
WSCSession.Builder |
withPackage(Package value)
With package.
|
WSCSession.Builder |
withProperty(String name,
Object value)
With property that allows configuration of various internal behaviors.
|
WSCSession.Builder |
withServiceAuthHandler(ServiceAuthHandler handler)
With service authentication handler.
|
WSCSession.Builder |
withSessionId(String value)
With session id.
|
WSCSession.Builder |
withStateInfo(String stateInfo)
With a StateInfo configuration.
|
WSCSession.Builder |
withUserName(String value)
With username which will be sent with the session connect message.
|
public static WSCSession.Builder create(URI webSocketURI)
WSCSession.Builder
.public WSCSession.Builder withConnectionCallback(WSCSession.ConnectionCallback value)
value
- Callback objectpublic WSCSession.Builder withHttpContext(HttpContext value)
value
- HTTP contextpublic WSCSession.Builder withObserver(WSCSession.Observer value)
value
- Observerpublic WSCSession.Builder withSessionId(String value)
value
- Session id valuepublic WSCSession.Builder withUserName(String value)
value
- Username valuepublic WSCSession.Builder withExtHeaders(Map value)
value
- Headerspublic WSCSession.Builder withProperty(String name, Object value)
name
- Property name; see WSCSession.PROP_* for list of properties,
for example WSCSession.PROP_RECONNECT_TIMEvalue
- Property valuepublic WSCSession.Builder withPackage(Package value)
value
- Packagepublic WSCSession.Builder withServiceAuthHandler(ServiceAuthHandler handler)
handler
- Authentication handlerpublic WSCSession.Builder withIceServerConfig(IceServerConfig config)
config
- ICE server configpublic WSCSession.Builder withHibernationHandler(HibernationHandler handler)
handler
- Hibernation handlerpublic WSCSession.Builder withContext(Object context)
context
- android.content.Context object from the Applicationpublic WSCSession.Builder withDeviceToken(String token)
token
- unique token idpublic WSCSession.Builder withStateInfo(String stateInfo)
stateInfo
- JSON format session data Stringpublic final WSCSession build()
WSCSession.ConnectionCallback
if set.