public abstract class ServerMessage
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
int |
getMessageTypeID()
Gets the message type identification number
|
static ServerMessage |
readMessage(java.io.DataInputStream in,
ProprietaryOrJCECipher cryptoProtocol,
java.security.Signature signingProtocol,
java.security.PublicKey publicKey)
The method used by readers to obtain a (structured) message from the given stream.
|
void |
sendMessage(java.io.DataOutputStream out,
java.security.Signature signingProtocol,
Signer signer,
ProprietaryOrJCECipher cryptoProtocol)
Sends this message to the given output stream using the given signing and encryption settings.
|
public static ServerMessage readMessage(java.io.DataInputStream in, ProprietaryOrJCECipher cryptoProtocol, java.security.Signature signingProtocol, java.security.PublicKey publicKey) throws java.io.IOException, ErrorMessageException, CommunicationProtocolException
in - The inputstream from which the ServerMessage to be returned is to be constructedcryptoProtocol - The protocol to be used for decryption of what arrives after the byte countsigningProtocol - the Signature used to verify the message signaturepublicKey - the public key used to verify the signaturejava.io.IOException - -ErrorMessageException - -CommunicationProtocolException - -public final int getMessageTypeID()
public final void sendMessage(java.io.DataOutputStream out,
java.security.Signature signingProtocol,
Signer signer,
ProprietaryOrJCECipher cryptoProtocol)
throws java.io.IOException,
CommunicationProtocolException
out - The outputStream to which the message is to be writtensigningProtocol - The Signature object needed to compute the signature for the message, or null if no signing is required.signer - The Signer object that will compute the message signature using the given signingProtocolcryptoProtocol - The encryption object that will computed the encrypted message if encryption is required, null if no encryption is required.CommunicationProtocolException - java.io.IOException - -