public static class WSCSession.Builder extends Object
Modifier and Type | Method and Description |
---|---|
WSCSession |
build()
Build a session, which will start the connect process.
|
static WSCSession.Builder |
create(URI webSocketURI)
Creates a new
WSCSession.Builder . |
WSCSession.Builder |
withConnectionCallback(WSCSession.ConnectionCallback value)
With connection callback listener.
|
WSCSession.Builder |
withExtHeaders(Map<String,?> value)
With extension headers which will be sent as part of session connect.
|
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 |
withUserName(String value)
With username which will be sent with 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<String,?> 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 config.public final WSCSession build()
WSCSession.ConnectionCallback
if set.