01: package org.objectweb.celtix.context;
02:
03: import java.security.Principal;
04: import javax.xml.ws.WebServiceContext;
05: import javax.xml.ws.handler.MessageContext;
06:
07: public class WebServiceContextImpl implements WebServiceContext {
08:
09: private static ThreadLocal<MessageContext> context = new ThreadLocal<MessageContext>();
10:
11: public WebServiceContextImpl() {
12: }
13:
14: public WebServiceContextImpl(MessageContext ctx) {
15: setMessageContext(ctx);
16: }
17:
18: // Implementation of javax.xml.ws.WebServiceContext
19:
20: public final MessageContext getMessageContext() {
21: return context.get();
22: }
23:
24: public final Principal getUserPrincipal() {
25: return null;
26: }
27:
28: public final boolean isUserInRole(final String string) {
29: return false;
30: }
31:
32: public static void setMessageContext(MessageContext ctx) {
33: context.set(ctx);
34: }
35:
36: public static void clear() {
37: context.set(null);
38: }
39: }
|