All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nablarch.common.handler.threadcontext.ExecutionIdAttribute Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package nablarch.common.handler.threadcontext;

import nablarch.core.ThreadContext;
import nablarch.core.log.LogUtil;
import nablarch.fw.ExecutionContext;

/**
 * スレッドコンテキストに保持する実行時ID。
 * 
 * @author Kiyohito Itoh
 */
public class ExecutionIdAttribute implements ThreadContextAttribute {
    
    /** {@inheritDoc} */
    public String getKey() {
        return ThreadContext.EXECUTION_ID_KEY;
    }
    
    /** {@inheritDoc} */
    public Object getValue(Object req, ExecutionContext ctx) {
        return LogUtil.generateExecutionId();
    }
}