public class SessionExtendedConnectionIdGenerator extends Object implements ConnectionIdGenerator
ConnectionIdGenerator
generates unique ids which are used to
identify the connected clients / users.
That implementation of ConnectionIdGenerator
uses and extends the
session ids to generate a unique connection / client id. That allows the user / client to use more than one browser
instance for the same application (multiple session ids / session sharing).Constructor and Description |
---|
SessionExtendedConnectionIdGenerator()
Creates a new instance of
SessionExtendedConnectionIdGenerator
and initializes the random number generation. |
Modifier and Type | Method and Description |
---|---|
String |
generateConnectionId(javax.servlet.http.HttpServletRequest aRequest)
Generates a new connection / client id.
|
String |
getConnectionId(javax.servlet.http.HttpServletRequest aRequest)
Returns the previous generated connection / client id
(see
ConnectionIdGenerator.generateConnectionId(javax.servlet.http.HttpServletRequest) )
without generating a new connection / client id. |
public SessionExtendedConnectionIdGenerator()
SessionExtendedConnectionIdGenerator
and initializes the random number generation.public String generateConnectionId(javax.servlet.http.HttpServletRequest aRequest)
SessionExtendedConnectionIdGenerator
creates a new session with
that call when no session is available. The session id will be extended with a random number to support multiple session ids / session sharing.generateConnectionId
in interface ConnectionIdGenerator
aRequest
- request from the clientpublic String getConnectionId(javax.servlet.http.HttpServletRequest aRequest)
ConnectionIdGenerator.generateConnectionId(javax.servlet.http.HttpServletRequest)
)
without generating a new connection / client id.getConnectionId
in interface ConnectionIdGenerator
aRequest
- requestConnectionIdGenerator.generateConnectionId(javax.servlet.http.HttpServletRequest)
Copyright © 2012. All Rights Reserved.