01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.transport;
19:
20: import java.io.IOException;
21:
22: import org.apache.cxf.message.Message;
23: import org.apache.cxf.ws.addressing.EndpointReferenceType;
24:
25: /**
26: * A Destination is a transport-level endpoint capable of receiving
27: * unsolicited incoming messages from different peers.
28: */
29: public interface Destination extends Observable {
30:
31: /**
32: * @return the reference associated with this Destination
33: */
34: EndpointReferenceType getAddress();
35:
36: /**
37: * Retreive a back-channel Conduit, which must be policy-compatible
38: * with the current Message and associated Destination. For example
39: * compatible Quality of Protection must be asserted on the back-channel.
40: * This would generally only be an issue if the back-channel is decoupled.
41: *
42: * @param inMessage the current message (null to indicate a disassociated
43: * back-channel.
44: * @param partialResponse in the decoupled case, this is expected to be the
45: * outbound Message to be sent over the in-built back-channel.
46: * @param address the backchannel address (null to indicate anonymous)
47: * @return a suitable Conduit
48: */
49: Conduit getBackChannel(Message inMessage, Message partialResponse,
50: EndpointReferenceType address) throws IOException;
51:
52: /**
53: * Shutdown the Destination, i.e. stop accepting incoming messages.
54: */
55: void shutdown();
56:
57: MessageObserver getMessageObserver();
58: }
|