org.ow2.jasmine.probe.outers
Class JOuter

java.lang.Object
  extended by java.lang.Thread
      extended by org.ow2.jasmine.probe.outers.JOuter
All Implemented Interfaces:
java.lang.Runnable, org.ow2.jasmine.probe.outer.JasmineOuter

public abstract class JOuter
extends java.lang.Thread
implements org.ow2.jasmine.probe.outer.JasmineOuter

Outer instance. this abstract class should be derived in different forms, depending of the type of output: console, file, mule, etc... These implementations are in separate modules.

Author:
durieuxp

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  java.text.SimpleDateFormat dateformat
          Std format for the date.
protected  org.ow2.util.log.Log logger
          logger used for outers
protected static java.lang.String NAME_SEPARATOR
          Separator used to construct data names from indicator name and result name.
protected static java.lang.String SEPARATOR
          CSV separator.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JOuter(org.ow2.jasmine.probe.JasmineOutput output)
           
 
Method Summary
protected  java.lang.String composeName(java.lang.String indicatorName, java.lang.String resultName)
           
abstract  void processData(org.ow2.jasmine.probe.JasmineProbeResult result)
           
 void publishData(org.ow2.jasmine.probe.JasmineProbeResult result)
          Publish data on this Output
 void run()
          run method for Thread implementation.
protected  boolean simpleDataName(java.lang.String name, java.util.Collection<org.ow2.jasmine.probe.JasmineSingleResult> jsrs)
          Check if simple name (the indicator's name) is to be published, or if the published name is to be composed from the indicator name and a simple result name.
 void stopIt()
          stop the AbstractOuter
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected org.ow2.util.log.Log logger
logger used for outers


SEPARATOR

protected static final java.lang.String SEPARATOR
CSV separator.

See Also:
Constant Field Values

NAME_SEPARATOR

protected static final java.lang.String NAME_SEPARATOR
Separator used to construct data names from indicator name and result name.

See Also:
Constant Field Values

dateformat

protected java.text.SimpleDateFormat dateformat
Std format for the date.

Constructor Detail

JOuter

public JOuter(org.ow2.jasmine.probe.JasmineOutput output)
Method Detail

processData

public abstract void processData(org.ow2.jasmine.probe.JasmineProbeResult result)

run

public void run()
run method for Thread implementation.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopIt

public void stopIt()
stop the AbstractOuter


publishData

public void publishData(org.ow2.jasmine.probe.JasmineProbeResult result)
Publish data on this Output

Specified by:
publishData in interface org.ow2.jasmine.probe.outer.JasmineOuter
Parameters:
result - data to publish

simpleDataName

protected boolean simpleDataName(java.lang.String name,
                                 java.util.Collection<org.ow2.jasmine.probe.JasmineSingleResult> jsrs)
Check if simple name (the indicator's name) is to be published, or if the published name is to be composed from the indicator name and a simple result name. This method implements the following rule: If one result, then use a simple name, the indicator name Otherwise: If the results have different names, then use a composed name Otherwise: If the names are equal to the indicator name, then use a simple name, the indicator name Otherwise, use a composed name

Parameters:
name - the indicator name
jsrs - the JasmineSingleResults of the indicator
Returns:
true if

composeName

protected java.lang.String composeName(java.lang.String indicatorName,
                                       java.lang.String resultName)


Copyright © 2011 OW2 Consortium. All Rights Reserved.