public abstract class AbstractActivityCollector extends Object implements ActivityCollector, AbstractActivityCollectorMBean
Constructor and Description |
---|
AbstractActivityCollector()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method closes the activity collector.
|
protected ActivityUnit |
createActivityUnit()
This method creates a new activity unit and
initializes its origin based on the template
supplied by the OriginInitializer, if
available.
|
protected String |
createTransactionId()
This method generates a unique transaction id.
|
void |
endScope()
This method completes the scope.
|
ActivityUnitLogger |
getActivityUnitLogger()
This method gets the activity logger.
|
ActivityValidatorManager |
getActivityValidatorManager()
This method gets the activity validator manager.
|
boolean |
getCollectionEnabled()
This method identifies whether the collection process should be
enabled.
|
CollectorContext |
getCollectorContext()
This method gets the collector context.
|
InformationProcessorManager |
getInformationProcessorManager()
This method gets the information processor manager.
|
protected long |
getTimestamp()
This method returns the current date/time.
|
void |
init()
Initialize the activity collector.
|
boolean |
isCollectionEnabled()
This method indicates whether activity collection is
currently enabled.
|
boolean |
isScopeActive()
This method determines whether a scope is already active.
|
String |
processInformation(String processor,
String type,
Object info,
Map<String,Object> headers,
ActivityType actType)
This method processes the information associated with the
supplied type, and returns the representation of that
information that should be included with the activity
event.
|
void |
record(ActivityType actType)
This method records the supplied activity type.
|
void |
setActivityUnitLogger(ActivityUnitLogger activityLogger)
This method sets the activity logger.
|
void |
setActivityValidatorManager(ActivityValidatorManager aim)
This method sets the activity validator manager.
|
void |
setCollectionEnabled(boolean enabled)
This method sets whether the collection process should be
enabled.
|
void |
setCollectorContext(CollectorContext cc)
This method sets the collector context.
|
void |
setInformationProcessorManager(InformationProcessorManager ipm)
This method sets the information processor manager.
|
void |
startScope()
This method can be used to create an application controlled
scope.
|
protected void |
startScope(ActivityUnit au)
This method starts the scope associated with the supplied activity unit.
|
void |
validate(ActivityType actType)
This method validates the supplied activity type.
|
public AbstractActivityCollector()
public void init()
public void setCollectorContext(CollectorContext cc)
cc
- The collector contextpublic CollectorContext getCollectorContext()
public boolean isCollectionEnabled()
isCollectionEnabled
in interface ActivityCollector
public boolean getCollectionEnabled()
getCollectionEnabled
in interface AbstractActivityCollectorMBean
public void setCollectionEnabled(boolean enabled)
setCollectionEnabled
in interface AbstractActivityCollectorMBean
enabled
- Whether enabledpublic void setActivityUnitLogger(ActivityUnitLogger activityLogger)
activityLogger
- The activity loggerpublic ActivityUnitLogger getActivityUnitLogger()
public InformationProcessorManager getInformationProcessorManager()
public void setInformationProcessorManager(InformationProcessorManager ipm)
ipm
- The information processor managerpublic ActivityValidatorManager getActivityValidatorManager()
public void setActivityValidatorManager(ActivityValidatorManager aim)
aim
- The activity validator managerprotected String createTransactionId()
protected long getTimestamp()
public void startScope()
startScope
in interface ActivityCollector
public boolean isScopeActive()
isScopeActive
in interface ActivityCollector
protected void startScope(ActivityUnit au)
au
- The activity unitprotected ActivityUnit createActivityUnit()
public void endScope()
endScope
in interface ActivityCollector
public String processInformation(String processor, String type, Object info, Map<String,Object> headers, ActivityType actType)
processInformation
in interface ActivityCollector
processor
- The optional information processor to usetype
- The information typeinfo
- The informationheaders
- The optional header informationactType
- The activity type being initializedpublic void validate(ActivityType actType) throws Exception
validate
in interface ActivityCollector
actType
- The activity typeException
- Failed to validate activitypublic void record(ActivityType actType)
record
in interface ActivityCollector
actType
- The activity typepublic void close()
Copyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.