KickJava   Java API By Example, From Geeks To Geeks.

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


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: ComponentContextMock.java 09:27:11 ddesjardins $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.demo.mortgage.gui.mock;
23
24 import java.util.MissingResourceException JavaDoc;
25 import java.util.logging.Logger JavaDoc;
26
27 import javax.jbi.JBIException;
28 import javax.jbi.component.ComponentContext;
29 import javax.jbi.management.MBeanNames;
30 import javax.jbi.messaging.DeliveryChannel;
31 import javax.jbi.messaging.MessagingException;
32 import javax.jbi.servicedesc.ServiceEndpoint;
33 import javax.management.MBeanServer JavaDoc;
34 import javax.naming.InitialContext JavaDoc;
35 import javax.xml.namespace.QName JavaDoc;
36
37 import org.w3c.dom.Document JavaDoc;
38 import org.w3c.dom.DocumentFragment JavaDoc;
39
40 /**
41  * Mock object of the ComponentContext
42  *
43  * @author ddesjardins - eBMWebsourcing
44  */

45 public class ComponentContextMock implements ComponentContext {
46
47     public ServiceEndpoint activateEndpoint(QName JavaDoc serviceName,
48         String JavaDoc endpointName) throws JBIException {
49         return null;
50     }
51
52     public void deactivateEndpoint(ServiceEndpoint endpoint)
53         throws JBIException {
54     }
55
56     public void deregisterExternalEndpoint(ServiceEndpoint externalEndpoint)
57         throws JBIException {
58     }
59
60     public String JavaDoc getComponentName() {
61         return null;
62     }
63
64     public DeliveryChannel getDeliveryChannel() throws MessagingException {
65         return deliveryChannel;
66     }
67
68     private DeliveryChannel deliveryChannel;
69
70     public void setDeliveryChannel(DeliveryChannel deliveryChannel) {
71         this.deliveryChannel = deliveryChannel;
72     }
73
74     public ServiceEndpoint getEndpoint(QName JavaDoc service, String JavaDoc name) {
75         return null;
76     }
77
78     public Document JavaDoc getEndpointDescriptor(ServiceEndpoint endpoint)
79         throws JBIException {
80         return null;
81     }
82
83     public ServiceEndpoint[] getEndpoints(QName JavaDoc interfaceName) {
84         return null;
85     }
86
87     public ServiceEndpoint[] getEndpointsForService(QName JavaDoc serviceName) {
88         return null;
89     }
90
91     public ServiceEndpoint[] getExternalEndpoints(QName JavaDoc interfaceName) {
92         return null;
93     }
94
95     public ServiceEndpoint[] getExternalEndpointsForService(QName JavaDoc serviceName) {
96         return null;
97     }
98
99     public String JavaDoc getInstallRoot() {
100         return null;
101     }
102
103     public Logger JavaDoc getLogger(String JavaDoc suffix, String JavaDoc resourceBundleName)
104         throws MissingResourceException JavaDoc, JBIException {
105         return null;
106     }
107
108     public MBeanNames getMBeanNames() {
109         return null;
110     }
111
112     public MBeanServer JavaDoc getMBeanServer() {
113         return null;
114     }
115
116     public InitialContext JavaDoc getNamingContext() {
117         return null;
118     }
119
120     public Object JavaDoc getTransactionManager() {
121         return null;
122     }
123
124     public String JavaDoc getWorkspaceRoot() {
125         return null;
126     }
127
128     public void registerExternalEndpoint(ServiceEndpoint externalEndpoint)
129         throws JBIException {
130     }
131
132     public ServiceEndpoint resolveEndpointReference(DocumentFragment JavaDoc epr) {
133         return null;
134     }
135
136 }
137
Popular Tags