public final class BooleanEntry extends Entry
Entry sub-class for boolean parameters.
During text parameter negotiation, boolean values are encoded as Yes and No,
meaning true and false, respectively.
The default or negotiated value can be accessed via the getBooleanValue() method.
EntryalreadyNegotiated, keySet, negotiationStatus, negotiationType, use, value| Constructor and Description |
|---|
BooleanEntry(KeySet keySet,
Use use,
NegotiationStatus negotiationStatus,
boolean negotiationValue,
BooleanResultFunction resultFunction,
Boolean defaultValue)
The
BooleanEntry constructor. |
| Modifier and Type | Method and Description |
|---|---|
Entry |
copy()
Returns an exact copy of this
Entry. |
Boolean |
getBooleanValue()
Returns the negotiated (or default) value as a
Boolean. |
protected boolean |
inProtocolValueRange(Object values)
This method is used for checking if a sub-class-specific
Object,
representing a single, a range, or a list of values sent by the
initiator, is illegal, according to the iSCSI standard. |
protected Object |
parseOffer(TargetServer target,
String values)
|
protected void |
processDeclaration(Object values)
Receives a sub-class-specific
Object, representing a legal
parameter value declared by the initiator and accepts it as the new Entry.value. |
protected String |
processNegotiation(Object values)
Receives a sub-class-specific
Object, representing a list, a
range, or a single legal parameter value offered by the initiator and
tries to select a value from that offer. |
checkAccepted, getIntegerValue, getNegotiationStatus, getStringValue, matchKey, negotiate, resetAlreadyNegotiatedpublic BooleanEntry(KeySet keySet, Use use, NegotiationStatus negotiationStatus, boolean negotiationValue, BooleanResultFunction resultFunction, Boolean defaultValue)
BooleanEntry constructor.keySet - contains all relevant keysuse - determines under which circumstances the parameter may be
negotiatednegotiationStatus - indicates whether there is a default value or if the parameter
must be negotiatednegotiationValue - together with the resultFunction parameter this value
indicates the values supported by the jSCSI TargetresultFunction - the result function to use during negotiationsdefaultValue - the default value or nullprotected Object parseOffer(TargetServer target, String values)
EntryString parameter and returns a
sub-class-specific Object which represents the the specified
value part a key=value pair.parseOffer in class Entryvalues - the value part of a key=value pairObject or null if the
parameter violated the expected formatprotected boolean inProtocolValueRange(Object values)
EntryObject,
representing a single, a range, or a list of values sent by the
initiator, is illegal, according to the iSCSI standard.inProtocolValueRange in class Entryvalues - a sub-class-specific Object, representing a single, a
range, or a list of values sent by the initiatorfalse if the iSCSI standard has been violated, true if notprotected void processDeclaration(Object values)
EntryObject, representing a legal
parameter value declared by the initiator and accepts it as the new Entry.value.processDeclaration in class Entryvalues - sub-class-specific representation of a single value
declared by the initiatorprotected String processNegotiation(Object values)
EntryObject, representing a list, a
range, or a single legal parameter value offered by the initiator and
tries to select a value from that offer. If none of the offered values is
supported by the jSCSI Target, null is returned, otherwise
the selection is accepted as the new Entry.value and returned as a String. Entry.value.processNegotiation in class Entryvalues - a sub-class-specific Object, representing a list, a
range, or a single legal parameter value offered by the
initiatornull, if the
initiator's offer does not overlap with the values supported by
the jSCSI Targetpublic Boolean getBooleanValue()
EntryBoolean.getBooleanValue in class EntryBooleanCopyright © 2012 University of Konstanz, Distributed Systems Group. All Rights Reserved.