package com.eactive.eai.adapter.socket2.common;

import java.util.Hashtable;


public class ExecutionContext extends ThreadLocal {
    static ExecutionContext instance = new ExecutionContext();

    public static ExecutionContext getInstance() {
        return instance;
    }

    private ExecutionContext() {
        super();
    }

    protected Object initialValue() {
        return new Hashtable();
    }  
    
    public void set(String key, Object value) {
        ((Hashtable) super.get()).put(key, value);
    }
    
    public Object get(String key) {
        return ((Hashtable) super.get()).get(key);
    }
    
    public void remove(String key) {
        ((Hashtable) super.get()).remove(key);
    }
    
    public void set(Object value) {
        throw new UnsupportedOperationException();
    }

    public Object get() {
        throw new UnsupportedOperationException();
    }

    public void remove() {
        throw new UnsupportedOperationException();
    }
}


