net.sf.sasl.aop.logging
Interface ILogSessionIEnvOfferer

All Known Implementing Classes:
RuntimeBenchIEnvOfferer

public interface ILogSessionIEnvOfferer

Interface defines methods that a log session interpreter environment variable offerer must implement. The implementation must be thread safe. An interpreter environment variable offerer offers additional placeholder interpreter environment variables, that can be than directly output in a placeholder script or transformed by placeholder procedures.
Could be used to record and output for example benchmark values.

Since:
0.0.2 (sasl-common-aspect-library)
Author:
Philipp Förmer

Method Summary
 void endLogSession(long sessionId)
          Ends the log session for the given session id that was before started via startLogSession(long).
 Map<String,Object> getIEnvMap(long sessionId, TargetMethodExecutionPhase executionPhase, org.aopalliance.intercept.MethodInvocation invocation, Object returnValue, Throwable occuredException)
          Returns a map of variables that should be passed as interpreter environment variables for the current target method execution phase.
 void startLogSession(long sessionId)
          Starts a new log session for a (targetObject, targetMethod, targetArguments) execution triple.
 

Method Detail

startLogSession

void startLogSession(long sessionId)
Starts a new log session for a (targetObject, targetMethod, targetArguments) execution triple. The method is called just before the call to the execution triple will be proceeded.
Note that there could be more than one log session started for the same thread.

Parameters:
sessionId - any unique long value.
Since:
0.0.2 (sasl-common-aspect-library)

getIEnvMap

Map<String,Object> getIEnvMap(long sessionId,
                              TargetMethodExecutionPhase executionPhase,
                              org.aopalliance.intercept.MethodInvocation invocation,
                              Object returnValue,
                              Throwable occuredException)
Returns a map of variables that should be passed as interpreter environment variables for the current target method execution phase. Such variables could for example hold benchmark results.

Parameters:
sessionId - any unique long value.
executionPhase - non null.
invocation - non null.
returnValue - null or non null, depending of the target method execution phase.
occuredException - null or non null, depending of the target method execution phase.
Returns:
null or non null map.
Since:
0.0.2 (sasl-common-aspect-library)

endLogSession

void endLogSession(long sessionId)
Ends the log session for the given session id that was before started via startLogSession(long). Could be used to clean up resources allocated for the log session. The method is called after a (targetObject, targetMethod, targetArguments) execution triple finished its execution (successful or with a failure).

Parameters:
sessionId - any unique long value.
Since:
0.0.2 (sasl-common-aspect-library)


Copyright © 2010. All Rights Reserved.