01: package org.objectweb.celtix.bus.bindings;
02:
03: import java.io.IOException;
04:
05: import javax.xml.ws.handler.MessageContext;
06:
07: import org.objectweb.celtix.bindings.AbstractBindingImpl;
08: import org.objectweb.celtix.bindings.DataBindingCallback;
09: 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 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(
45: MessageContext orig) {
46: MessageContext bindingCtx = new GenericMessageContext();
47: if (null != orig) {
48: bindingCtx.putAll(orig);
49: }
50: return bindingCtx;
51: }
52:
53: public void marshal(ObjectMessageContext objContext,
54: MessageContext context, DataBindingCallback callback) {
55: }
56:
57: public void marshalFault(ObjectMessageContext objContext,
58: MessageContext context, DataBindingCallback callback) {
59: }
60:
61: public void unmarshal(MessageContext context,
62: ObjectMessageContext objContext,
63: DataBindingCallback callback) {
64: }
65:
66: public void unmarshalFault(MessageContext context,
67: ObjectMessageContext objContext,
68: DataBindingCallback callback) {
69: }
70:
71: public void read(InputStreamMessageContext inContext,
72: MessageContext msgContext) throws IOException {
73: }
74:
75: public void write(MessageContext msgContext,
76: OutputStreamMessageContext outContext) throws IOException {
77: }
78:
79: public boolean hasFault(MessageContext msgContext) {
80: return false;
81: }
82:
83: public void updateMessageContext(MessageContext msgContext) {
84: }
85:
86: }
|