Data access flags. More...
Public Member Functions | |
TAccess (int newMode) | |
Constructor. More... | |
void | clear () |
Sets the access mode to CA_NULL. | |
String | toString () |
Returns a string representation of the access mode. More... | |
short | toShort () |
Returns the access mode bits as a short integer. More... | |
boolean | includes (short pattern) |
Returns true if all bits which are set in pattern are also set in this object. More... | |
boolean | isRead () |
Returns true if read bit is set. More... | |
boolean | isWrite () |
Returns true if write bit is set. More... | |
boolean | isNetwork () |
Returns true if network bit is set. More... | |
boolean | isFirst () |
Returns true if FIRST bit is set. More... | |
boolean | isLast () |
Returns true if LAST bit is set. More... | |
boolean | isNull () |
Returns true if no bit is set. More... | |
boolean | canRetry () |
boolean | equals (TAccess acc) |
Returns true if all bits are equal. More... | |
boolean | includes (TAccess acc) |
Returns true if all mode bits which are set in another object are also set in this object. More... | |
void | add (short mode) |
Appends the input access mode flag. | |
void | add (TAccess acc) |
Appends the input access mode flag. | |
Static Public Member Functions | |
static short | getAccessCode (String accessString) |
Gets the TINE access code for the given access string. More... | |
static boolean | hasExclusiveRead (String accessString) |
Determines whether the given input access string has 'exclusive read' access. More... | |
static boolean | isEnforceOutput (String accessString) |
Determines whether the given input property access string enforces the output data type and length. More... | |
static boolean | hasUnlockedExclusiveRead (String accessString) |
Determines whether the given input access string has 'exclusive read' access even without an access lock. More... | |
static short | toBase (short access) |
converts to the principal access required (combination of CA_READ or CA_WRITE). More... | |
static TAccess | valueOf (short mode) |
Converts the given input to a TAccess object. More... | |
static String | toString (short access) |
Returns a string representation of the access mode given. More... | |
static boolean | isRead (byte access) |
Returns true if read bit is set. More... | |
static boolean | isWrite (byte access) |
Returns true if write bit is set. More... | |
static boolean | isNetwork (short access) |
Returns true if network bit is set. More... | |
static boolean | isFirst (byte access) |
Returns true if FIRST bit is set. More... | |
static boolean | isLast (byte access) |
Returns true if LAST bit is set. More... | |
static byte | removeBits (byte access, short bits) |
Returns the input access byte with the appropriate bits removed. More... | |
static boolean | isSynchronous (byte access) |
Returns true if both the FIRST and LAST bits are set. More... | |
Data access flags.
The access word in a TLink will contain information pertaining to the type of access requested by the caller or by the subsystem. A client can specify 'CA_READ' or 'CA_WRITE' and in addition ask for a data link over a connected (TCP/IP) socket by specifying 'CA_CONNECT'. A server can examine the access word when handling the call. A server can also determine whether the call is coming from the local alarm server or local history server. Likewise, a server can examine the scope of the call, that is whether the link is starting up (the 'CA_FIRST' bit is set) or going out of scope (the 'CA_LAST' bit is set).
de.desy.tine.definitions.TAccess.TAccess | ( | int | newMode | ) |
Constructor.
Used for when CF-constants are OR-ed
newMode |
boolean de.desy.tine.definitions.TAccess.canRetry | ( | ) |
boolean de.desy.tine.definitions.TAccess.equals | ( | TAccess | acc | ) |
Returns true if all bits are equal.
acc |
|
static |
Gets the TINE access code for the given access string.
accessString | is the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc. |
|
static |
Determines whether the given input access string has 'exclusive read' access.
accessString | is the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc. |
true
or false
|
static |
Determines whether the given input access string has 'exclusive read' access even without an access lock.
accessString | is the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc. |
boolean de.desy.tine.definitions.TAccess.includes | ( | short | pattern | ) |
Returns true if all bits which are set in pattern are also set in this object.
pattern | A Bit pattern. |
Referenced by de.desy.tine.definitions.TAccess.includes().
boolean de.desy.tine.definitions.TAccess.includes | ( | TAccess | acc | ) |
Returns true if all mode bits which are set in another object are also set in this object.
acc |
References de.desy.tine.definitions.TAccess.includes().
|
static |
Determines whether the given input property access string enforces the output data type and length.
accessString | is the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc. |
true
or false
boolean de.desy.tine.definitions.TAccess.isFirst | ( | ) |
Returns true if FIRST bit is set.
|
static |
Returns true if FIRST bit is set.
access | is the access byte to test |
boolean de.desy.tine.definitions.TAccess.isLast | ( | ) |
Returns true if LAST bit is set.
|
static |
Returns true if LAST bit is set.
access | is the access byte to test |
boolean de.desy.tine.definitions.TAccess.isNetwork | ( | ) |
Returns true if network bit is set.
|
static |
Returns true if network bit is set.
access | is the access byte to test |
boolean de.desy.tine.definitions.TAccess.isNull | ( | ) |
Returns true if no bit is set.
boolean de.desy.tine.definitions.TAccess.isRead | ( | ) |
Returns true if read bit is set.
true
if read bit is set. Referenced by de.desy.tine.queryUtils.TQuery.getDeviceServerReport(), and de.desy.tine.server.properties.TExportProperty.setAccessMode().
|
static |
Returns true if read bit is set.
access | is the access byte to test |
true
if read bit is set.
|
static |
Returns true if both the FIRST and LAST bits are set.
access | is the access byte to test |
boolean de.desy.tine.definitions.TAccess.isWrite | ( | ) |
Returns true if write bit is set.
true
if write bit is set. Referenced by de.desy.tine.server.properties.TPropertyHandler.callHandler(), de.desy.tine.client.TLink.execute(), and de.desy.tine.server.properties.TExportProperty.setAccessMode().
|
static |
Returns true if write bit is set.
access | is the access byte to test |
true
if write bit is set.
|
static |
Returns the input access byte with the appropriate bits removed.
access | is the access byte from which to remove the bit |
bits | are the access bits to remove |
|
static |
converts to the principal access required (combination of CA_READ or CA_WRITE).
access | is the access mode for which the base mode is desired |
short de.desy.tine.definitions.TAccess.toShort | ( | ) |
Returns the access mode bits as a short integer.
Referenced by de.desy.tine.server.equipment.TEquipmentModule.callProperty().
String de.desy.tine.definitions.TAccess.toString | ( | ) |
Returns a string representation of the access mode.
References de.desy.tine.definitions.TAccess.toString().
Referenced by de.desy.tine.definitions.TAccess.toString().
|
static |
Returns a string representation of the access mode given.
access | is the access mode for which the string representation is desired |
References de.desy.tine.definitions.TAccess.add().
|
static |