KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jbi > messaging > MessageExchange


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * 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 JavaDoc;
20
21 import javax.jbi.servicedesc.ServiceEndpoint;
22
23 import javax.xml.namespace.QName JavaDoc;
24
25 public interface MessageExchange
26 {
27     String JavaDoc JTA_TRANSACTION_PROPERTY_NAME = "javax.jbi.transaction.jta";
28     
29     URI JavaDoc getPattern();
30     
31     String JavaDoc getExchangeId();
32     
33     ExchangeStatus getStatus();
34         
35     void setStatus(ExchangeStatus status)
36         throws MessagingException;
37         
38     void setError(Exception JavaDoc error);
39     
40     Exception JavaDoc getError();
41     
42     Fault getFault();
43         
44     void setFault(Fault fault)
45         throws MessagingException;
46     
47     NormalizedMessage createMessage()
48         throws MessagingException;
49     
50     Fault createFault()
51         throws MessagingException;
52         
53     NormalizedMessage getMessage(String JavaDoc name);
54         
55     void setMessage(NormalizedMessage msg, String JavaDoc name)
56         throws MessagingException;
57     
58     Object JavaDoc getProperty(String JavaDoc name);
59     
60     void setProperty(String JavaDoc name, Object JavaDoc obj);
61     
62     void setEndpoint(ServiceEndpoint endpoint);
63     
64     void setService(QName JavaDoc service);
65     
66     void setInterfaceName(QName JavaDoc interfaceName);
67     
68     void setOperation(QName JavaDoc name);
69     
70     ServiceEndpoint getEndpoint();
71     
72     QName JavaDoc getInterfaceName();
73     
74     QName JavaDoc getService();
75     
76     QName JavaDoc getOperation();
77     
78     boolean isTransacted();
79
80     Role getRole();
81         
82     java.util.Set JavaDoc getPropertyNames();
83
84     public static final class Role
85     {
86         public static final Role PROVIDER = new Role();
87
88         public static final Role CONSUMER = new Role();
89
90         private Role()
91         {
92         }
93     }
94 }
95
Popular Tags