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

com.taobao.api.internal.toplink.remoting.MethodCallContext Maven / Gradle / Ivy

The newest version!
package com.taobao.api.internal.toplink.remoting;

import java.util.HashMap;
import java.util.Map;

import com.taobao.api.internal.toplink.channel.ChannelSender;
import com.taobao.api.internal.toplink.channel.ServerChannelSender;

public class MethodCallContext {
	private Map callContext;
	private ServerChannelSender sender;

	public MethodCallContext(ChannelSender sender) {
		this.sender = (ServerChannelSender) sender;
		this.callContext = new HashMap();
	}

	public Object get(Object key) {
		Object val = this.getCallContext(key);
		// callcontext first
		return val != null ? val : this.sender.getContext(key);
	}

	public Object getCallContext(Object key) {
		return this.callContext.get(key);
	}

	public void setCallContext(Object key, Object value) {
		this.callContext.put(key, value);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy