Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-VB/ActiveX | API-Java | Examples | Downloads
Public Member Functions | Static Public Member Functions
de.desy.tine.definitions.TAccess Class Reference

Data access flags. More...

List of all members.

Public Member Functions

 TAccess (int newMode)
 Constructor.
void clear ()
 Sets the access mode to CA_NULL.
String toString ()
 Returns a string representation of the access mode.
short toShort ()
 Returns the access mode bits as a short integer.
boolean includes (short pattern)
 Returns true if all bits which are set in pattern are also set in this object.
boolean isRead ()
 Returns true if read bit is set.
boolean isWrite ()
 Returns true if write bit is set.
boolean isNetwork ()
 Returns true if network bit is set.
boolean isFirst ()
 Returns true if FIRST bit is set.
boolean isLast ()
 Returns true if LAST bit is set.
boolean isNull ()
 Returns true if no bit is set.
boolean canRetry ()
boolean equals (TAccess acc)
 Returns true if all bits are equal.
boolean includes (TAccess acc)
 Returns true if all mode bits which are set in another object are also set in this object.
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.
static boolean hasExclusiveRead (String accessString)
 Determines whether the given input access string has 'exclusive read' access.
static boolean hasUnlockedExclusiveRead (String accessString)
 Determines whether the given input access string has 'exclusive read' access even without an access lock.
static short toBase (short access)
 converts to the principal access required (combination of CA_READ or CA_WRITE).
static TAccess valueOf (short mode)
 Converts the given input to a TAccess object.
static String toString (short access)
 Returns a string representation of the access mode given.
static boolean isRead (byte access)
 Returns true if read bit is set.
static boolean isWrite (byte access)
 Returns true if write bit is set.
static boolean isNetwork (short access)
 Returns true if network bit is set.
static boolean isFirst (byte access)
 Returns true if FIRST bit is set.
static boolean isLast (byte access)
 Returns true if LAST bit is set.
static byte removeBits (byte access, short bits)
 Returns the input access byte with the appropriate bits removed.
static boolean isSynchronous (byte access)
 Returns true if both the FIRST and LAST bits are set.

Detailed Description

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).


Constructor & Destructor Documentation

de.desy.tine.definitions.TAccess.TAccess ( int  newMode)

Constructor.

Used for when CF-constants are OR-ed

Parameters:
newMode

Member Function Documentation

boolean de.desy.tine.definitions.TAccess.canRetry ( )
Returns:
true if the access contains the CA_RETRY flag
boolean de.desy.tine.definitions.TAccess.equals ( TAccess  acc)

Returns true if all bits are equal.

Parameters:
acc
Returns:
static short de.desy.tine.definitions.TAccess.getAccessCode ( String  accessString) [static]

Gets the TINE access code for the given access string.

Parameters:
accessStringis the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc.
Returns:
the TINE access code
static boolean de.desy.tine.definitions.TAccess.hasExclusiveRead ( String  accessString) [static]

Determines whether the given input access string has 'exclusive read' access.

Parameters:
accessStringis the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc.
Returns:
true of false
static boolean de.desy.tine.definitions.TAccess.hasUnlockedExclusiveRead ( String  accessString) [static]

Determines whether the given input access string has 'exclusive read' access even without an access lock.

Parameters:
accessStringis the access string of the form "READ", "READ|WRITE", "XREAD|WRITE", etc.
Returns:
true of false
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.

Parameters:
patternA Bit pattern.
Returns:
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.

Parameters:
acc
Returns:
boolean de.desy.tine.definitions.TAccess.isFirst ( )

Returns true if FIRST bit is set.

Returns:
true if FIRST bit is set.
static boolean de.desy.tine.definitions.TAccess.isFirst ( byte  access) [static]

Returns true if FIRST bit is set.

Parameters:
accessis the access byte to test
Returns:
true if FIRST bit is set.
boolean de.desy.tine.definitions.TAccess.isLast ( )

Returns true if LAST bit is set.

Returns:
true if LAST bit is set.
static boolean de.desy.tine.definitions.TAccess.isLast ( byte  access) [static]

Returns true if LAST bit is set.

Parameters:
accessis the access byte to test
Returns:
true if LAST bit is set.
static boolean de.desy.tine.definitions.TAccess.isNetwork ( short  access) [static]

Returns true if network bit is set.

Parameters:
accessis the access byte to test
Returns:
true if read bit is set.
boolean de.desy.tine.definitions.TAccess.isNetwork ( )

Returns true if network bit is set.

Returns:
true if read bit is set.
boolean de.desy.tine.definitions.TAccess.isNull ( )

Returns true if no bit is set.

Returns:
boolean de.desy.tine.definitions.TAccess.isRead ( )

Returns true if read bit is set.

Returns:
true if read bit is set.
static boolean de.desy.tine.definitions.TAccess.isRead ( byte  access) [static]

Returns true if read bit is set.

Parameters:
accessis the access byte to test
Returns:
true if read bit is set.
static boolean de.desy.tine.definitions.TAccess.isSynchronous ( byte  access) [static]

Returns true if both the FIRST and LAST bits are set.

Parameters:
accessis the access byte to test
Returns:
true if both the FIRST and LAST bits are set.
boolean de.desy.tine.definitions.TAccess.isWrite ( )

Returns true if write bit is set.

Returns:
true if write bit is set.
static boolean de.desy.tine.definitions.TAccess.isWrite ( byte  access) [static]

Returns true if write bit is set.

Parameters:
accessis the access byte to test
Returns:
true if write bit is set.
static byte de.desy.tine.definitions.TAccess.removeBits ( byte  access,
short  bits 
) [static]

Returns the input access byte with the appropriate bits removed.

Parameters:
accessis the access byte from which to remove the bit
bitsare the access bits to remove
Returns:
the input access byte with the appropriate bit removed
static short de.desy.tine.definitions.TAccess.toBase ( short  access) [static]

converts to the principal access required (combination of CA_READ or CA_WRITE).

Parameters:
accessis the access mode for which the base mode is desired
Returns:
the base access mode (one of CA_NULL, CA_READ, CA_WRITE, or CA_READ|CA_WRITE)
short de.desy.tine.definitions.TAccess.toShort ( )

Returns the access mode bits as a short integer.

Returns:
String de.desy.tine.definitions.TAccess.toString ( )

Returns a string representation of the access mode.

Returns:
the string representation of the access mode
static String de.desy.tine.definitions.TAccess.toString ( short  access) [static]

Returns a string representation of the access mode given.

Parameters:
accessis the access mode for which the string representation is desired
Returns:
the string representation of the access mode
static TAccess de.desy.tine.definitions.TAccess.valueOf ( short  mode) [static]

Converts the given input to a TAccess object.

Parameters:
modeis the access mode for which a TAccess object is desired
Returns:
a TAccess Object representative of the input mode

The documentation for this class was generated from the following file: