/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Implements {@link WebServiceContext}'s {@link MessageContext} on top of {@link Packet}.
*
* <p>
* This class creates a {@link Map} view for APPLICATION scoped properties that
* gets exposed to endpoint implementations during the invocation
* of web methods. The implementations access this map using
* WebServiceContext.getMessageContext().
*
* <p>
* Some of the {@link Map} methods requre this class to
* build the complete {@link Set} of properties, but we
* try to avoid that as much as possible.
*
*
* @author Jitendra Kotamraju
*/
@SuppressWarnings({"SuspiciousMethodCalls"})
public final class EndpointMessageContextImpl extends AbstractMap<String,Object> implements MessageContext {
/**
* Lazily computed.
*/
/**
* @param packet
* The {@link Packet} to wrap.
*/
}
}
return null; // no such application-scope property
}
//add the attachments from the Message to the corresponding attachment property
}
return atts;
}
return value;
}
}
throw new IllegalArgumentException("Cannot overwrite property in HANDLER scope");
}
// Overwrite existing APPLICATION scoped property
return old;
}
// No existing property. So Add a new property
return null;
}
}
throw new IllegalArgumentException("Cannot remove property in HANDLER scope");
}
// Remove existing APPLICATION scoped property
return old;
}
// No existing property.
return null;
}
}
return entrySet;
}
throw new UnsupportedOperationException(
"All the properties in this context are in APPLICATION scope. Cannot do setScope().");
}
throw new UnsupportedOperationException(
"All the properties in this context are in APPLICATION scope. Cannot do getScope().");
}
public boolean hasNext() {
}
return cur;
}
public void remove() {
}
};
}
public int size() {
return createBackupMap().size();
}
}
}
}
return backupMap;
}
}