01: package com.sun.xml.ws.handler;
02:
03: import com.sun.istack.Nullable;
04: import com.sun.xml.ws.api.WSBinding;
05: import com.sun.xml.ws.api.handler.MessageHandlerContext;
06: import com.sun.xml.ws.api.message.Message;
07: import com.sun.xml.ws.api.message.Packet;
08: import com.sun.xml.ws.api.model.SEIModel;
09:
10: import java.util.Set;
11:
12: /**
13: * @author Rama Pulavarthi
14: */
15: public class MessageHandlerContextImpl extends MessageUpdatableContext
16: implements MessageHandlerContext {
17: private @Nullable
18: SEIModel seiModel;
19: private Set<String> roles;
20: private WSBinding binding;
21:
22: public MessageHandlerContextImpl(@Nullable
23: SEIModel seiModel, WSBinding binding, Packet packet,
24: Set<String> roles) {
25: super (packet);
26: this .seiModel = seiModel;
27: this .binding = binding;
28: this .roles = roles;
29: }
30:
31: public Message getMessage() {
32: return packet.getMessage();
33: }
34:
35: public void setMessage(Message message) {
36: packet.setMessage(message);
37: }
38:
39: public Set<String> getRoles() {
40: return roles;
41: }
42:
43: public WSBinding getWSBinding() {
44: return binding;
45: }
46:
47: public @Nullable
48: SEIModel getSEIModel() {
49: return seiModel;
50: }
51:
52: void updateMessage() {
53: // Do Nothing
54: }
55:
56: void setPacketMessage(Message newMessage) {
57: setMessage(newMessage);
58: }
59: }
|