public final class StringEntry extends Entry
Entry sub-class is used for managing and negotiation String
parameters. The value part of the corresponding key-value pairs
can be made up of one or several comma-separated strings.
The default or negotiated value can be accessed via the getStringValue() method.
EntryalreadyNegotiated, keySet, negotiationStatus, negotiationType, use, value| Constructor and Description |
|---|
StringEntry(KeySet keySet,
NegotiationType negotiationType,
Use use,
NegotiationStatus negotiationStatus,
String[] supportedValues,
Object defaultValue)
The
StringEntry constructor. |
| Modifier and Type | Method and Description |
|---|---|
Entry |
copy()
Returns an exact copy of this
Entry. |
String |
getStringValue()
Returns the negotiated (or default) value as a
String. |
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, getBooleanValue, getIntegerValue, getNegotiationStatus, matchKey, negotiate, resetAlreadyNegotiatedpublic StringEntry(KeySet keySet, NegotiationType negotiationType, Use use, NegotiationStatus negotiationStatus, String[] supportedValues, Object defaultValue)
StringEntry constructor.keySet - contains all relevant keysnegotiationType - declared or negotiateduse - determines under which circumstances the parameter may be
negotiatednegotiationStatus - indicates whether there is a default value or if the parameter
must be negotiatedsupportedValues - all values supported by the jSCSI TargetdefaultValue - the default value or nullprotected 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 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 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 String getStringValue()
EntryString.getStringValue in class EntryStringCopyright © 2012 University of Konstanz, Distributed Systems Group. All Rights Reserved.