public class NullSasFacilityImpl extends Object implements SasFacility
| Modifier and Type | Field and Description |
|---|---|
static SasFacility |
NULL_SAS_FACILITY |
CONFIG_PROPERTY_NAME, JNDI_NAME| Modifier and Type | Method and Description |
|---|---|
Trail |
copyOrCreateTrail(ActivityContextInterface fromActivity,
ActivityContextInterface toActivity)
Attach the Trail from
fromActivity to toActivity. |
Trail |
getOrCreateTrail(ActivityContextInterface aci)
Get the trail attached to an activity or a new trail if one is not bound.
|
Trail |
getOrCreateTrail(ActivityHandle handle)
Get the trail attached to an activity or a new trail if one is not bound.
|
Trail |
getOrCreateTrail(EventContext event)
Get the trail attached to the activity owning an event, or a new trail if one is not bound.
|
Reference |
getReference() |
Trail |
getTrail(ActivityHandle handle)
Get the trail attached to an activity.
|
boolean |
isEnabled()
Return the current state of the global SAS enabled flag.
|
void |
setActivityTrail(ActivityContextInterface aci,
Trail trail)
Set the trail for an Activity.
|
void |
setActivityTrail(ActivityHandle handle,
Trail trail)
Set the trail for an Activity.
|
void |
setActivityTrail(EventContext event,
Trail trail)
Attach a given Trail to the Activity owning an EventContext.
|
Trail |
startAndAssociateTrail(Trail trail,
Scope scope)
Start a new colocated SAS trail, and associate it with the original trail.
|
Trail |
startColocatedTrail(Trail trail)
Start a new SAS trail on the same server as an existing SAS trail.
|
Trail |
startTrail()
Send a start marker on the next trail ID, and return a trail to create and send messages on.
|
Trail |
startTrail(UUID steeringId)
Send a start marker on the next trail ID, and return a trail to create and send messages on.
|
public static final SasFacility NULL_SAS_FACILITY
public final Reference getReference()
getReference in interface Referenceablepublic boolean isEnabled()
SasFacilityReturn the current state of the global SAS enabled flag.
isEnabled in interface SasFacilitypublic Trail startTrail()
SasFacilitySend a start marker on the next trail ID, and return a trail to create and send messages on. Trails are distributed between available servers by a simple round robin algorithm.
Service code (SBBs, SBB Parts) should use SasFacility.getOrCreateTrail(ActivityContextInterface) in preference to this method.
startTrail in interface SasFacilitypublic Trail startTrail(UUID steeringId)
SasFacilitySend a start marker on the next trail ID, and return a trail to create and send messages on. Trails are distributed between available servers by a simple round robin algorithm. Uses a UUID steering ID provided by another network element to associate with a trail reported by that element.
Service code (SBBs, SBB Parts) should use SasFacility.getOrCreateTrail(ActivityContextInterface) in preference to this method.
startTrail in interface SasFacilitypublic Trail startColocatedTrail(Trail trail)
SasFacilityStart a new SAS trail on the same server as an existing SAS trail.
To facilitate associating trails when using a federation of SAS servers this method starts the new trail on the same server as the provided trail.
startColocatedTrail in interface SasFacilitytrail - a Trail associated with the desired SAS servertrail, or the NullTrail if this server is unavailable permanently.public Trail startAndAssociateTrail(Trail trail, Scope scope)
SasFacilityStart a new colocated SAS trail, and associate it with the original trail.
startAndAssociateTrail in interface SasFacilitytrail - to associate withscope - association scopepublic Trail copyOrCreateTrail(ActivityContextInterface fromActivity, ActivityContextInterface toActivity)
SasFacilityAttach the Trail from fromActivity to toActivity.
If no Trail is attached to fromActivity, start a Trail, and attach it to both Activities.
This blindly overwrites any existing trail attachment in toActivity.
copyOrCreateTrail in interface SasFacilityfromActivity - Activity to copy trail fromtoActivity - Activity to copy trail topublic void setActivityTrail(ActivityHandle handle, Trail trail)
SasFacilitySet the trail for an Activity. This association is one-way, a trail may be attached to multiple activities.
This method is only usable from SasFacility instances owned by a Resource Adaptor.
setActivityTrail in interface SasFacilityhandle - The handle for the Activity to attach the trail totrail - The trail to attachpublic void setActivityTrail(EventContext event, Trail trail)
SasFacilityAttach a given Trail to the Activity owning an EventContext.
setActivityTrail in interface SasFacilityevent - EventContext owned by the Activity to attach the Trail totrail - to attach to Activity owning eventpublic void setActivityTrail(ActivityContextInterface aci, Trail trail)
SasFacilitySet the trail for an Activity. This association is one-way, a trail may be attached to multiple activities.
This method is only usable from SasFacility instances obtained from an SBB context.
setActivityTrail in interface SasFacilityaci - The ACI for the Activity to attach the trail totrail - The trail to attachpublic Trail getTrail(ActivityHandle handle)
SasFacilityGet the trail attached to an activity. Returns null if no activity is bound.
This method is only usable from SasFacility instances owned by a Resource Adaptor.
RAs should create the trail and attach it with SasFacility.setActivityTrail(ActivityHandle, Trail) before calling this method.
getTrail in interface SasFacilityhandle - The handle for the Activity to get the trail frompublic Trail getOrCreateTrail(ActivityHandle handle)
SasFacilityGet the trail attached to an activity or a new trail if one is not bound. The new trail will be bound to the activity.
This method is only usable from SasFacility instances obtained from a Resource Adaptor context.
getOrCreateTrail in interface SasFacilityhandle - An ActivityHandle referencing the Activity to get the trail frompublic Trail getOrCreateTrail(EventContext event)
SasFacilityGet the trail attached to the activity owning an event, or a new trail if one is not bound. The new trail will be bound to the owning activity.
getOrCreateTrail in interface SasFacilityevent - An event on the Activity to fetch the trail frompublic Trail getOrCreateTrail(ActivityContextInterface aci)
SasFacilityGet the trail attached to an activity or a new trail if one is not bound. The new trail will be bound to the activity.
This method is only usable from SasFacility instances obtained from an SBB context.
getOrCreateTrail in interface SasFacilityaci - An ACI referencing the Activity to get the trail from