KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > binding > xquarebc > mock > MockMessageExchange


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id : $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.binding.xquarebc.mock;
23
24 import java.net.URI JavaDoc;
25 import java.util.Set JavaDoc;
26
27 import javax.jbi.messaging.ExchangeStatus;
28 import javax.jbi.messaging.Fault;
29 import javax.jbi.messaging.MessageExchange;
30 import javax.jbi.messaging.MessagingException;
31 import javax.jbi.messaging.NormalizedMessage;
32 import javax.jbi.servicedesc.ServiceEndpoint;
33 import javax.xml.namespace.QName JavaDoc;
34
35 /**
36  *
37  * @version $Rev: 250 $Date: {date}
38  * @since Petals 1.0
39  * @author Marc Dutoo - Open Wide
40  *
41  */

42 public class MockMessageExchange implements MessageExchange {
43
44     boolean fault = false;
45
46     boolean status = false;
47
48     private static final long serialVersionUID = 1L;
49
50     public void setFault(Fault fault) {
51         this.fault = true;
52     }
53
54     public void setMessage(NormalizedMessage msg, String JavaDoc name) {
55     }
56
57     public void setStatus(ExchangeStatus status) {
58         this.status = true;
59     }
60
61     public Fault createFault() throws MessagingException {
62         return new MockFault();
63     }
64
65     public NormalizedMessage createMessage() throws MessagingException {
66         return null;
67     }
68
69     public ServiceEndpoint getEndpoint() {
70         return null;
71     }
72
73     public Exception JavaDoc getError() {
74         return null;
75     }
76
77     public String JavaDoc getExchangeId() {
78         return null;
79     }
80
81     public Fault getFault() {
82         return null;
83     }
84
85     public QName JavaDoc getInterfaceName() {
86         return null;
87     }
88
89     public NormalizedMessage getMessage(String JavaDoc name) {
90         return null;
91     }
92
93     public QName JavaDoc getOperation() {
94         return null;
95     }
96
97     public URI JavaDoc getPattern() {
98         return null;
99     }
100
101     public Object JavaDoc getProperty(String JavaDoc name) {
102         return null;
103     }
104
105     public Set JavaDoc getPropertyNames() {
106         return null;
107     }
108
109     public Role getRole() {
110         return null;
111     }
112
113     public QName JavaDoc getService() {
114         return null;
115     }
116
117     public ExchangeStatus getStatus() {
118         return null;
119     }
120
121     public boolean isTransacted() {
122         return false;
123     }
124
125     public boolean isFault() {
126         return fault;
127     }
128
129     public boolean isStatus() {
130         return status;
131     }
132
133     public void setEndpoint(ServiceEndpoint endpoint) {
134
135     }
136
137     public void setError(Exception JavaDoc error) {
138
139     }
140
141     public void setInterfaceName(QName JavaDoc interfaceName) {
142
143     }
144
145     public void setOperation(QName JavaDoc name) {
146
147     }
148
149     public void setProperty(String JavaDoc name, Object JavaDoc obj) {
150
151     }
152
153     public void setService(QName JavaDoc service) {
154
155     }
156
157 }
158
Popular Tags