Package com.iizix.server.client
Class ClientParams
java.lang.Object
com.iizix.server.client.ClientParams
Class used to hold the information for the client parameters and to parse the Query string in the Client WebSocket URI.
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionfinal AppFactory
The application to use, null if not found.final String
The Application ID, null if not found.final String
The error message, null for OK.final String
The user hash when the user is returning.final String
The original query.static final String
The Server configuration environment property: "env".The session user identifier, null if not defined properly.Constructor Summary
ConstructorDescriptionClientParams
(ServerShell server, String query) Constructor with public key required from remote party.ClientParams
(ServerShell server, String query, boolean doRequireKey) Constructor.Method Summary
Modifier and TypeMethodDescriptionvoid
appendPublicKey
(SendTransaction trans) Appends the server public key for the Diffie-Hellman key exchange with the client.assignSessionID
(String sessionID) Assigns a new Session ID for this session.getParameterValue
(String name) Gets a property that is defined as the "other" properties, e.g.toString()
Returns a string representation of this client parameters and its values.final String
updatePassword
(ReadTransaction trans) Updates the instance with the encrypted password in the transaction from a client.
Field Details
SERVER_CONFIGURATION_ENVIRONMENT
The Server configuration environment property: "env".- See Also:
query
The original query.error
The error message, null for OK.appID
The Application ID, null if not found.app
The application to use, null if not found.user
The session user identifier, null if not defined properly.hash
The user hash when the user is returning.
Constructor Details
ClientParams
Constructor with public key required from remote party.- Parameters:
server
- The server instance.query
- The Query string from the URI.
ClientParams
Constructor.- Parameters:
server
- The server instance.query
- The Query string from the URI.doRequireKey
- Public key required in "&k=" parameter and Application ID in "&app=".
Method Details
assignSessionID
Assigns a new Session ID for this session. This changes theuser
instance to a newSessionUserIdentifier
instance.- Parameters:
sessionID
- The session ID.- Returns:
- The new SessionUserIdentifier.
appendPublicKey
Appends the server public key for the Diffie-Hellman key exchange with the client.- Parameters:
trans
- The transaction.
updatePassword
public final String updatePassword(ReadTransaction trans) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException, InvalidAlgorithmParameterException Updates the instance with the encrypted password in the transaction from a client.- Parameters:
trans
- The transaction.- Returns:
- The password.
- Throws:
IllegalArgumentException
- If the password encoding is invalid.UnsupportedEncodingException
- If the named charset is not supported.BadPaddingException
IllegalBlockSizeException
NoSuchPaddingException
NoSuchAlgorithmException
InvalidKeyException
InvalidAlgorithmParameterException
getParameterValue
Gets a property that is defined as the "other" properties, e.g.SERVER_CONFIGURATION_ENVIRONMENT
for server configuration environment.- Parameters:
name
- The parameter name, e.g. "env".- Returns:
- The defined parameter value, or null if undefined.
toString
Returns a string representation of this client parameters and its values.