Top Description Fields Constructors Methods
org.springframework.web.socket.sockjs.client

public Class SockJsUrlInfo

extends Object
Class Inheritance
Imports
java.net.URI, java.util.UUID, org.springframework.lang.Nullable, org.springframework.util.IdGenerator, .JdkIdGenerator, .StringUtils, org.springframework.web.socket.sockjs.transport.TransportType, org.springframework.web.util.UriComponentsBuilder

Container for the base URL of a SockJS endpoint with additional helper methods to derive related SockJS URLs: specifically, the info and transport URLs.
Authors
Rossen Stoyanchev, Juergen Hoeller
Since
4.1

Field Summary

Modifier and TypeField and Description
private static final IdGenerator
private String
private String
private final URI
private UUID

Constructor Summary

AccessConstructor and Description
public
SockJsUrlInfo(URI
the target URL
sockJsUrl
)

Construct a new SockJsUrlInfo instance, calculating a random server id and session id if necessary.

public
SockJsUrlInfo(URI
the target URL
sockJsUrl
,
String
a pre-determined server id, if any
serverId
,
String
a pre-determined session id, if any
sessionId
)

Construct a new SockJsUrlInfo instance.

Method Summary

Modifier and TypeMethod and Description
public URI
private String
getScheme(TransportType transportType)

public String
public String
public URI
public URI
protected UUID
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

idGeneratorback to summary
private static final IdGenerator idGenerator
serverIdback to summary
private String serverId
Annotations
@Nullable
sessionIdback to summary
private String sessionId
Annotations
@Nullable
sockJsUrlback to summary
private final URI sockJsUrl
uuidback to summary
private UUID uuid
Annotations
@Nullable

Constructor Detail

SockJsUrlInfoback to summary
public SockJsUrlInfo(URI sockJsUrl)

Construct a new SockJsUrlInfo instance, calculating a random server id and session id if necessary.

Parameters
sockJsUrl:URI

the target URL

SockJsUrlInfoback to summary
public SockJsUrlInfo(URI sockJsUrl, String serverId, String sessionId)

Construct a new SockJsUrlInfo instance.

Parameters
sockJsUrl:URI

the target URL

serverId:String

a pre-determined server id, if any

sessionId:String

a pre-determined session id, if any

Since
6.1.3

Method Detail

getInfoUrlback to summary
public URI getInfoUrl()
getSchemeback to summary
private String getScheme(TransportType transportType)
getServerIdback to summary
public String getServerId()
getSessionIdback to summary
public String getSessionId()
getSockJsUrlback to summary
public URI getSockJsUrl()
getTransportUrlback to summary
public URI getTransportUrl(TransportType transportType)
getUuidback to summary
protected UUID getUuid()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override