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 SummaryFieldsModifier and TypeFieldDescription- final AppFactoryThe application to use, null if not found.- final StringThe Application ID, null if not found.- final StringThe error message, null for OK.- final StringThe user hash when the user is returning.- final StringThe original query.- static final StringThe Server configuration environment property: "env".The session user identifier, null if not defined properly.
- Constructor SummaryConstructorsConstructorDescription- ClientParams- (ServerShell server, String query) Constructor with public key required from remote party.- ClientParams- (ServerShell server, String query, boolean doRequireKey) Constructor.
- Method SummaryModifier and TypeMethodDescription- void- 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_ENVIRONMENTThe Server configuration environment property: "env".- See Also:
 
- queryThe original query.
- errorThe error message, null for OK.
- appIDThe Application ID, null if not found.
- appThe application to use, null if not found.
- userThe session user identifier, null if not defined properly.
- hashThe user hash when the user is returning.
 
- Constructor Details- ClientParamsConstructor with public key required from remote party.- Parameters:
- server- The server instance.
- query- The Query string from the URI.
 
- ClientParamsConstructor.- 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- assignSessionIDAssigns a new Session ID for this session. This changes the- userinstance to a new- SessionUserIdentifierinstance.- Parameters:
- sessionID- The session ID.
- Returns:
- The new SessionUserIdentifier.
 
- appendPublicKeyAppends the server public key for the Diffie-Hellman key exchange with the client.- Parameters:
- trans- The transaction.
 
- updatePasswordpublic 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
 
- getParameterValueGets a property that is defined as the "other" properties, e.g.- SERVER_CONFIGURATION_ENVIRONMENTfor server configuration environment.- Parameters:
- name- The parameter name, e.g. "env".
- Returns:
- The defined parameter value, or null if undefined.
 
- toStringReturns a string representation of this client parameters and its values.