public final class ActivityFlags extends Object
A Resource Adaptor specifies activity flags when creating an activity using the
SleeEndpoint.startActivity(ActivityHandle, Object, int)
,
SleeEndpoint.startActivitySuspended(ActivityHandle, Object, int)
,
SleeEndpoint.startActivityTransacted(ActivityHandle, Object, int)
methods.
Modifier and Type | Field and Description |
---|---|
static int |
NO_FLAGS
Requests no additional behavior from the SLEE.
|
static int |
REQUEST_ACTIVITY_UNREFERENCED_CALLBACK
Request a
ResourceAdaptor.activityUnreferenced(javax.slee.resource.ActivityHandle) callback
from the SLEE when the activity is no longer referenced within the SLEE. |
static int |
REQUEST_ENDED_CALLBACK
Request an
ResourceAdaptor.activityEnded(javax.slee.resource.ActivityHandle) callback from
the SLEE when the activity has ended. |
static int |
SLEE_MAY_MARSHAL
Indicate to the SLEE that the SLEE may marshal and unmarshal the activity
handle if required to do so.
|
static int |
STANDARD_FLAGS_MASK
This bit-mask specifies the activity flag bits reserved for current and
future use by the JAIN SLEE specification.
|
static int |
VENDOR_FLAGS_MASK
This bit-mask specifies the activity flag bits reserved for SLEE vendors
to represent optional proprietary behavior.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
hasFlags(int flags,
int flagsToTestFor)
Test an integer for the presence of one or more flags.
|
static boolean |
hasNoFlags(int flags)
Determine whether the specified activity flags request no special behavior.
|
static boolean |
hasRequestEndedCallback(int flags)
Test for the presence of the
REQUEST_ENDED_CALLBACK flag. |
static boolean |
hasRequestSleeActivityGCCallback(int flags)
Test for the presence of the
REQUEST_ACTIVITY_UNREFERENCED_CALLBACK flag. |
static boolean |
hasSleeMayMarshal(int flags)
Test for the presence of the
SLEE_MAY_MARSHAL flag. |
static boolean |
hasStandardFlags(int flags)
Determine whether the specified flags request any of the SLEE specification
defined special behavior.
|
static boolean |
hasVendorFlags(int flags)
Determine whether the specified flags request any vendor specific behavior.
|
static int |
setRequestEndedCallback(int currentFlags)
Add the
REQUEST_ENDED_CALLBACK flag to an existing integer representation
of activity flags. |
static int |
setRequestSleeActivityGCCallback(int currentFlags)
Add the
REQUEST_ACTIVITY_UNREFERENCED_CALLBACK flag to an existing integer
representation of activity flags. |
static int |
setSleeMayMarshal(int currentFlags)
Add the
SLEE_MAY_MARSHAL flag to an existing integer representation of
activity flags. |
static String |
toString(int flags)
Get a string representation of an integer containing activity flags.
|
public static final int NO_FLAGS
public static final int SLEE_MAY_MARSHAL
Marshaler
interface that is capable
of marshaling activities.public static final int REQUEST_ENDED_CALLBACK
ResourceAdaptor.activityEnded(javax.slee.resource.ActivityHandle)
callback from
the SLEE when the activity has ended.public static final int REQUEST_ACTIVITY_UNREFERENCED_CALLBACK
ResourceAdaptor.activityUnreferenced(javax.slee.resource.ActivityHandle)
callback
from the SLEE when the activity is no longer referenced within the SLEE.public static final int STANDARD_FLAGS_MASK
public static final int VENDOR_FLAGS_MASK
public static boolean hasNoFlags(int flags)
flags
- integer representation of a set of activity flags to test.true
if the flags define no special behavior,
false
otherwise.public static boolean hasStandardFlags(int flags)
flags
- integer representation of a set of activity flags to test.true
if the flags define any SLEE defined special behavior,
false
otherwise.public static boolean hasVendorFlags(int flags)
flags
- integer representation of a set of activity flags to test.true
if the flags define any vendor defined special behavior,
false
otherwise.public static boolean hasFlags(int flags, int flagsToTestFor)
flags
- integer representation of a set of activity flags to test.flagsToTestFor
- the flags to test for. This may include flags defined
by this class and/or vendor specific flags.true
if the specified flags are set, false
otherwise.public static boolean hasSleeMayMarshal(int flags)
SLEE_MAY_MARSHAL
flag.flags
- integer representation of a set of activity flags to test.true
if the flags include the SLEE_MAY_MARSHAL
flag, false
otherwise.public static boolean hasRequestEndedCallback(int flags)
REQUEST_ENDED_CALLBACK
flag.flags
- integer representation of a set of activity flags to test.true
if the flags include the REQUEST_ENDED_CALLBACK
flag, false
otherwise.public static boolean hasRequestSleeActivityGCCallback(int flags)
REQUEST_ACTIVITY_UNREFERENCED_CALLBACK
flag.flags
- integer representation of a set of activity flags to test.true
if the flags include the
REQUEST_ACTIVITY_UNREFERENCED_CALLBACK
flag, false
otherwise.public static int setSleeMayMarshal(int currentFlags)
SLEE_MAY_MARSHAL
flag to an existing integer representation of
activity flags. The new flag is bitwise OR'ed onto the existing flags. This
method has no effect if the SLEE_MAY_MARSHAL
flag is already present
in the existing flags.currentFlags
- the existing integer representation of activity flags.SLEE_MAY_MARSHAL
flag set.public static int setRequestEndedCallback(int currentFlags)
REQUEST_ENDED_CALLBACK
flag to an existing integer representation
of activity flags. The new flag is bitwise OR'ed onto the existing flags. This
method has no effect if the REQUEST_ENDED_CALLBACK
flag is already
present in the existing flags.currentFlags
- the existing integer representation of activity flags.REQUEST_ENDED_CALLBACK
flag set.public static int setRequestSleeActivityGCCallback(int currentFlags)
REQUEST_ACTIVITY_UNREFERENCED_CALLBACK
flag to an existing integer
representation of activity flags. The new flag is bitwise OR'ed onto the existing
flags. This method has no effect if the REQUEST_ACTIVITY_UNREFERENCED_CALLBACK
flag is already present in the existing flags.currentFlags
- the existing integer representation of activity flags.REQUEST_ACTIVITY_UNREFERENCED_CALLBACK
flag set.public static String toString(int flags)
flags
- integer representation of a set of activity flags.