ch.elca.el4j.core.correlationId
Class CorrelationIdManagerSlf4jImpl

java.lang.Object
  extended by ch.elca.el4j.core.correlationId.CorrelationIdManagerSlf4jImpl
All Implemented Interfaces:
CorrelationIdManager

public class CorrelationIdManagerSlf4jImpl
extends Object
implements CorrelationIdManager

Provides an implementation of the CorrelationIdManager which stores the current correlation Id as the variable 'correlationId' in SLF4J's MDC.

Author:
Simon Stelling (SST)
File-location:
CorrelationIdManagerSlf4jImpl
Last check-in date:
2010-12-21 11:08:04 +0100 (Di, 21. Dez 2010) by swismer for revision 4253

Constructor Summary
CorrelationIdManagerSlf4jImpl()
           
 
Method Summary
 void clearCurrentCorrelationId()
          Clears the correlation id.
 void createNewCorrelationId()
          generates a new correlation Id value and sets it as the new current value.
 String getCurrentCorrelationId()
          
 void setCurrentCorrelationId(String correlationId)
          sets the current correlation id to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorrelationIdManagerSlf4jImpl

public CorrelationIdManagerSlf4jImpl()
Method Detail

createNewCorrelationId

public void createNewCorrelationId()
generates a new correlation Id value and sets it as the new current value.

Specified by:
createNewCorrelationId in interface CorrelationIdManager

getCurrentCorrelationId

public String getCurrentCorrelationId()

Specified by:
getCurrentCorrelationId in interface CorrelationIdManager
Returns:
the current correlation id

setCurrentCorrelationId

public void setCurrentCorrelationId(String correlationId)
sets the current correlation id to the specified value.

Specified by:
setCurrentCorrelationId in interface CorrelationIdManager
Parameters:
correlationId - the new value

clearCurrentCorrelationId

public void clearCurrentCorrelationId()
Clears the correlation id. Subsequent calls to getCurrentCorrelationId() will return null until setCurrentCorrelationId() or createNewCorrelationId() are called.

Specified by:
clearCurrentCorrelationId in interface CorrelationIdManager


Copyright © 2005-2011 ELCA. All Rights Reserved.