Package com.unitesk.aspectrace.common
Class CommonAdapter
- java.lang.Object
-
- com.unitesk.aspectrace.AspectAdapter
-
- com.unitesk.aspectrace.common.CommonAdapter
-
public class CommonAdapter extends AspectAdapter
An adapter for an empty aspect.This adapter handles special messages (without namespace in XML). Also it handles tag messages in all aspects by distributing them via
processGlobalTagChange
method of handlers.Method
getAspect()
returns an empty string.
-
-
Constructor Summary
Constructors Constructor Description CommonAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAspect()
Gets the name of the aspect that is being handled.java.lang.Class<CommonListener>
getListenerClass()
Gets interface class which must be realized by all handlers of this aspect.protected java.util.List<CommonListener>
getListeners()
Gets list of handlers for the internal use.void
processingFinished(java.lang.String providerDesc, boolean normally)
Notification from provider: end trace handling.void
processingStarted(java.lang.String providerDesc)
Notification from provider: begin trace handling.protected void
processMessage(TraceMessage msg)
Handles one message from provider.protected void
processTagMessage(TagMessage msg)
Notification about tags change from provider.-
Methods inherited from class com.unitesk.aspectrace.AspectAdapter
addListener, addProcessorTag, getAllTags, getCurrentChannel, getMyTags, getTraceProvider, removeListener, removeProcessorTag, setCurrentChannel
-
-
-
-
Method Detail
-
getAspect
public java.lang.String getAspect()
Description copied from class:AspectAdapter
Gets the name of the aspect that is being handled.- Specified by:
getAspect
in classAspectAdapter
-
getListenerClass
public java.lang.Class<CommonListener> getListenerClass()
Description copied from class:AspectAdapter
Gets interface class which must be realized by all handlers of this aspect.- Specified by:
getListenerClass
in classAspectAdapter
-
processingStarted
public void processingStarted(java.lang.String providerDesc)
Description copied from class:AspectAdapter
Notification from provider: begin trace handling. By agreement, this method is overridden only in the class whichCommonAdapter
distributes the corresponding message between the handlers and provider notifies only this method.- Overrides:
processingStarted
in classAspectAdapter
-
processingFinished
public void processingFinished(java.lang.String providerDesc, boolean normally)
Description copied from class:AspectAdapter
Notification from provider: end trace handling. By agreement, this method is overridden only in the class whichCommonAdapter
, distributes the corresponding message between the handlers and provider notifies only this method.- Overrides:
processingFinished
in classAspectAdapter
-
processTagMessage
protected void processTagMessage(TagMessage msg)
Description copied from class:AspectAdapter
Notification about tags change from provider. This message is being send to the CommonAdapter and to the corresponding aspect adapter.- Overrides:
processTagMessage
in classAspectAdapter
-
processMessage
protected void processMessage(TraceMessage msg) throws java.lang.IllegalArgumentException
Description copied from class:AspectAdapter
Handles one message from provider. Realized by concrete aspect dependent adapters. Usual method behaviour - converts raw message from provider into aspect dependent message and distributes it to handlers. Class messagesTagMessage
come in adapter via method callAspectAdapter.processTagMessage(TagMessage)
.- Overrides:
processMessage
in classAspectAdapter
- Throws:
java.lang.IllegalArgumentException
- Incorrect message struct or incorrect message data
-
getListeners
protected java.util.List<CommonListener> getListeners()
Description copied from class:AspectAdapter
Gets list of handlers for the internal use. Subclasses must override this method with an appropriate type of return value.- Overrides:
getListeners
in classAspectAdapter
-
-