KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > demo > mortgage > gui > mock > InOutMock


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: InOutMock.java 10:07:25 ddesjardins $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.demo.mortgage.gui.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.InOut;
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  * Mock of InOut
37  *
38  * @author ddesjardins - eBMWebsourcing
39  */

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