blob: fba75396b2dcb6a0c55d203b1f66ad4a8607db49 [file] [log] [blame]
/*
* Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package com.sun.xml.internal.ws.handler;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.xml.ws.LogicalMessage;
import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.MessageContext;
/**
* Implementation of LogicalMessageContext. This class is used at runtime
* to pass to the handlers for processing logical messages.
*
* <p>Class has to defer information to HandlerContext so that properties
* are shared between this and SOAPMessageContext.
*
* @see MessageContextImpl
*
* @author WS Development Team
*/
public class LogicalMessageContextImpl implements LogicalMessageContext {
SOAPHandlerContext handlerCtxt;
MessageContext ctxt;
public LogicalMessageContextImpl(SOAPHandlerContext handlerCtxt) {
this.handlerCtxt = handlerCtxt;
ctxt = handlerCtxt.getMessageContext();
}
public HandlerContext getHandlerContext() {
return handlerCtxt;
}
public LogicalMessage getMessage() {
return new LogicalMessageImpl(handlerCtxt);
}
public void setScope(String name, Scope scope) {
ctxt.setScope(name, scope);
}
public Scope getScope(String name) {
return ctxt.getScope(name);
}
/* java.util.Map methods below here */
public void clear() {
ctxt.clear();
}
public boolean containsKey(Object obj) {
return ctxt.containsKey(obj);
}
public boolean containsValue(Object obj) {
return ctxt.containsValue(obj);
}
public Set<Entry<String, Object>> entrySet() {
return ctxt.entrySet();
}
public Object get(Object obj) {
return ctxt.get(obj);
}
public boolean isEmpty() {
return ctxt.isEmpty();
}
public Set<String> keySet() {
return ctxt.keySet();
}
public Object put(String str, Object obj) {
return ctxt.put(str, obj);
}
public void putAll(Map<? extends String, ? extends Object> map) {
ctxt.putAll(map);
}
public Object remove(Object obj) {
return ctxt.remove(obj);
}
public int size() {
return ctxt.size();
}
public Collection<Object> values() {
return ctxt.values();
}
}