KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > bus > bindings > TestBinding


1 package org.objectweb.celtix.bus.bindings;
2
3 import java.io.IOException JavaDoc;
4
5 import javax.xml.ws.handler.MessageContext;
6
7 import org.objectweb.celtix.bindings.AbstractBindingImpl;
8 import org.objectweb.celtix.bindings.DataBindingCallback;
9 import org.objectweb.celtix.bus.handlers.HandlerChainInvoker;
10 import org.objectweb.celtix.context.GenericMessageContext;
11 import org.objectweb.celtix.context.InputStreamMessageContext;
12 import org.objectweb.celtix.context.ObjectMessageContext;
13 import org.objectweb.celtix.context.OutputStreamMessageContext;
14 import org.objectweb.celtix.handlers.HandlerInvoker;
15
16 public class TestBinding extends AbstractBindingImpl {
17     public static final String JavaDoc TEST_BINDING = "http://celtix.objectweb.org/bindings/test";
18     
19     private final TestClientBinding clientBinding;
20     private final TestServerBinding serverBinding;
21     
22     public TestBinding(TestClientBinding tcb) {
23         clientBinding = tcb;
24         serverBinding = null;
25     }
26     
27     public TestBinding(TestServerBinding tsb) {
28         serverBinding = tsb;
29         clientBinding = null;
30     }
31     
32     public TestClientBinding getClientBinding() {
33         return clientBinding;
34     }
35     
36     public TestServerBinding getServerBinding() {
37         return serverBinding;
38     }
39     
40     public HandlerInvoker createHandlerInvoker() {
41         return new HandlerChainInvoker(getHandlerChain(true));
42     }
43     
44     public MessageContext createBindingMessageContext(MessageContext orig) {
45         MessageContext bindingCtx = new GenericMessageContext();
46         if (null != orig) {
47             bindingCtx.putAll(orig);
48         }
49         return bindingCtx;
50     }
51
52     public void marshal(ObjectMessageContext objContext,
53                             MessageContext context,
54                             DataBindingCallback callback) {
55     }
56     
57     public void marshalFault(ObjectMessageContext objContext,
58                             MessageContext context,
59                             DataBindingCallback callback) {
60     }
61     
62     public void unmarshal(MessageContext context,
63                               ObjectMessageContext objContext,
64                               DataBindingCallback callback) {
65     }
66     
67     public void unmarshalFault(MessageContext context,
68                                    ObjectMessageContext objContext,
69                                    DataBindingCallback callback) {
70     }
71
72     public void read(InputStreamMessageContext inContext, MessageContext msgContext)
73         throws IOException JavaDoc {
74     }
75
76     public void write(MessageContext msgContext, OutputStreamMessageContext outContext)
77         throws IOException JavaDoc {
78     }
79
80     public boolean hasFault(MessageContext msgContext) {
81         return false;
82     }
83
84     public void updateMessageContext(MessageContext msgContext) {
85     }
86     
87     
88     
89 }
90
Popular Tags