Class MessageProp
When used with the GSSContext interface's wrap and getMIC methods, an instance of this class is used to indicate the desired Quality-of-Protection (QOP) and to request if confidentiality services are to be applied to caller supplied data (wrap only). To request default QOP, the value of 0 should be used for QOP.
When used with the unwrap and verifyMIC methods of the GSSContext
interface, an instance of this class will be used to indicate the
applied QOP and confidentiality services over the supplied message.
In the case of verifyMIC, the confidentiality state will always be
false. Upon return from these methods, this object will also
contain any supplementary status values applicable to the processed
token. The supplementary status values can indicate old tokens, out
of sequence tokens, gap tokens or duplicate tokens.
- Since:
- 1.4
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMessageProp(boolean privState) Constructor which sets the desired privacy state.MessageProp(int qop, boolean privState) Constructor which sets the values for the qop and privacy state. -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the minor status code that the underlying mechanism might have set for this per-message operation.Retrieves a string explaining the minor status code.booleanRetrieves the privacy state.intgetQOP()Retrieves the QOP value.booleanTests if this is a duplicate of an earlier token.booleanTests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed.booleanTests if this token's validity period has expired, i.e., the token is too old to be checked for duplication.booleanTests if a later token had already been processed.voidsetPrivacy(boolean privState) Sets the privacy state.voidsetQOP(int qop) Sets the QOP value.voidsetSupplementaryStates(boolean duplicate, boolean old, boolean unseq, boolean gap, int minorStatus, String minorString) This method sets the state for the supplementary information flags and the minor status in MessageProp.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
MessageProp
public MessageProp(boolean privState) Constructor which sets the desired privacy state. The QOP value used is 0.- Parameters:
privState- the privacy (i.e. confidentiality) state
-
MessageProp
public MessageProp(int qop, boolean privState) Constructor which sets the values for the qop and privacy state.- Parameters:
qop- the QOP valueprivState- the privacy (i.e. confidentiality) state
-
-
Method Details
-
getQOP
public int getQOP()Retrieves the QOP value.- Returns:
- an int representing the QOP value
- See Also:
-
getPrivacy
public boolean getPrivacy()Retrieves the privacy state.- Returns:
- true if the privacy (i.e., confidentiality) state is true, false otherwise.
- See Also:
-
setQOP
public void setQOP(int qop) Sets the QOP value.- Parameters:
qop- the int value to set the QOP to- See Also:
-
setPrivacy
public void setPrivacy(boolean privState) Sets the privacy state.- Parameters:
privState- true is the privacy (i.e., confidentiality) state is true, false otherwise.- See Also:
-
isDuplicateToken
public boolean isDuplicateToken()Tests if this is a duplicate of an earlier token.- Returns:
- true if this is a duplicate, false otherwise.
-
isOldToken
public boolean isOldToken()Tests if this token's validity period has expired, i.e., the token is too old to be checked for duplication.- Returns:
- true if the token's validity period has expired, false otherwise.
-
isUnseqToken
public boolean isUnseqToken()Tests if a later token had already been processed.- Returns:
- true if a later token had already been processed, false otherwise.
-
isGapToken
public boolean isGapToken()Tests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed.- Returns:
- true if an expected per-message token was not received, false otherwise.
-
getMinorStatus
public int getMinorStatus()Retrieves the minor status code that the underlying mechanism might have set for this per-message operation.- Returns:
- the int minor status
-
getMinorString
Retrieves a string explaining the minor status code.- Returns:
- a String corresponding to the minor status
code.
nullwill be returned when no minor status code has been set.
-
setSupplementaryStates
public void setSupplementaryStates(boolean duplicate, boolean old, boolean unseq, boolean gap, int minorStatus, String minorString) This method sets the state for the supplementary information flags and the minor status in MessageProp. It is not used by the application but by the GSS implementation to return this information to the caller of a per-message context method.- Parameters:
duplicate- true if the token was a duplicate of an earlier token, false otherwiseold- true if the token's validity period has expired, false otherwiseunseq- true if a later token has already been processed, false otherwisegap- true if one or more predecessor tokens have not yet been successfully processed, false otherwiseminorStatus- the int minor status code for the per-message operationminorString- the textual representation of the minorStatus value
-