01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package javax.jbi.messaging;
18:
19: import java.net.URI;
20:
21: import javax.jbi.servicedesc.ServiceEndpoint;
22:
23: import javax.xml.namespace.QName;
24:
25: public interface MessageExchange {
26: String JTA_TRANSACTION_PROPERTY_NAME = "javax.jbi.transaction.jta";
27:
28: URI getPattern();
29:
30: String getExchangeId();
31:
32: ExchangeStatus getStatus();
33:
34: void setStatus(ExchangeStatus status) throws MessagingException;
35:
36: void setError(Exception error);
37:
38: Exception getError();
39:
40: Fault getFault();
41:
42: void setFault(Fault fault) throws MessagingException;
43:
44: NormalizedMessage createMessage() throws MessagingException;
45:
46: Fault createFault() throws MessagingException;
47:
48: NormalizedMessage getMessage(String name);
49:
50: void setMessage(NormalizedMessage msg, String name)
51: throws MessagingException;
52:
53: Object getProperty(String name);
54:
55: void setProperty(String name, Object obj);
56:
57: void setEndpoint(ServiceEndpoint endpoint);
58:
59: void setService(QName service);
60:
61: void setInterfaceName(QName interfaceName);
62:
63: void setOperation(QName name);
64:
65: ServiceEndpoint getEndpoint();
66:
67: QName getInterfaceName();
68:
69: QName getService();
70:
71: QName getOperation();
72:
73: boolean isTransacted();
74:
75: Role getRole();
76:
77: java.util.Set getPropertyNames();
78:
79: public static final class Role {
80: public static final Role PROVIDER = new Role();
81:
82: public static final Role CONSUMER = new Role();
83:
84: private Role() {
85: }
86: }
87: }
|