public final class KeyInfo extends Object
key info bit flags. Use this class as a utility to
get or set the bit flags when dealing with Message.KEY_INFO message.
The bit flags have following meaning:
Message.READ is supported)Message.WRITE is supported)Message.createInvoke(int) is supported)Message.KEYS)
When a readable or writable flag is true, it does not necessarily guarantee that
subsequent Message.READ or Message.WRITE message will succeed. Read or write can
fail due to some momentary bad state. An object field is expected not to be readable resp.
writable when it's known that the field can not be read (e.g. a bean property without a getter)
resp. can not be written to (e.g. a bean property without a setter). The same applies to
invocable flag and invoke message.
When the key does not exist (0. bit is zero), then all other bits must be zero as well.
| Modifier and Type | Class and Description |
|---|---|
class |
KeyInfo.Builder
A builder of bit flags.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isExisting(int infoBits)
Test if the bits represent an existing key.
|
static boolean |
isInternal(int infoBits)
Test if internal flag is on.
|
static boolean |
isInvocable(int infoBits)
Test if invocable flag is on.
|
static boolean |
isReadable(int infoBits)
Test if readable flag is on.
|
static boolean |
isWritable(int infoBits)
Test if writable flag is on.
|
static KeyInfo.Builder |
newBuilder()
Create a new bit flags builder.
|
public static KeyInfo.Builder newBuilder()
0 directly to inform about a non-existing key.public static boolean isExisting(int infoBits)
public static boolean isReadable(int infoBits)
public static boolean isWritable(int infoBits)
public static boolean isInvocable(int infoBits)
public static boolean isInternal(int infoBits)