01: package org.objectweb.celtix.bus.bindings;
02:
03: import java.io.IOException;
04: import java.util.concurrent.Executor;
05: import java.util.concurrent.Future;
06:
07: import javax.wsdl.Port;
08: import javax.xml.ws.handler.MessageContext;
09:
10: import org.objectweb.celtix.Bus;
11: import org.objectweb.celtix.bindings.ResponseCallback;
12: import org.objectweb.celtix.context.InputStreamMessageContext;
13: import org.objectweb.celtix.context.OutputStreamMessageContext;
14: import org.objectweb.celtix.transports.ClientTransport;
15: import org.objectweb.celtix.ws.addressing.EndpointReferenceType;
16:
17: public class TestClientTransport implements ClientTransport {
18:
19: private InputStreamMessageContext istreamCtx;
20:
21: public TestClientTransport() {
22: }
23:
24: public TestClientTransport(Bus bus, EndpointReferenceType ref) {
25: }
26:
27: public EndpointReferenceType getTargetEndpoint() {
28: return null;
29: }
30:
31: public EndpointReferenceType getDecoupledEndpoint()
32: throws IOException {
33: return null;
34: }
35:
36: public Port getPort() {
37: return null;
38: }
39:
40: public OutputStreamMessageContext createOutputStreamContext(
41: MessageContext context) throws IOException {
42: return new TestOutputStreamContext(null, context);
43: }
44:
45: public void finalPrepareOutputStreamContext(
46: OutputStreamMessageContext context) throws IOException {
47: }
48:
49: public void invokeOneway(OutputStreamMessageContext context)
50: throws IOException {
51: //nothing to do
52: }
53:
54: public InputStreamMessageContext invoke(
55: OutputStreamMessageContext context) throws IOException {
56: if (null != istreamCtx) {
57: return istreamCtx;
58: }
59: return context.getCorrespondingInputStreamContext();
60: }
61:
62: public Future<InputStreamMessageContext> invokeAsync(
63: OutputStreamMessageContext context, Executor ex)
64: throws IOException {
65: return null;
66: }
67:
68: public ResponseCallback getResponseCallback() {
69: return null;
70: }
71:
72: public void shutdown() {
73: //nothing to do
74: }
75:
76: public void setInputStreamMessageContext(InputStreamMessageContext i) {
77: istreamCtx = i;
78: }
79: }
|