Source Code Cross Referenced for DummyServerIL.java in  » EJB-Server-JBoss-4.2.1 » testsuite » org » jboss » test » jbossmq » support » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » testsuite » org.jboss.test.jbossmq.support 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JBoss, Home of Professional Open Source
003:         * Copyright 2006, JBoss Inc., and individual contributors as indicated
004:         * by the @authors tag. See the copyright.txt in the distribution for a
005:         * full listing of individual contributors.
006:         *
007:         * This is free software; you can redistribute it and/or modify it
008:         * under the terms of the GNU Lesser General Public License as
009:         * published by the Free Software Foundation; either version 2.1 of
010:         * the License, or (at your option) any later version.
011:         *
012:         * This software is distributed in the hope that it will be useful,
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015:         * Lesser General Public License for more details.
016:         *
017:         * You should have received a copy of the GNU Lesser General Public
018:         * License along with this software; if not, write to the Free
019:         * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020:         * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021:         */
022:        package org.jboss.test.jbossmq.support;
023:
024:        import java.io.IOException;
025:
026:        import javax.jms.Destination;
027:        import javax.jms.Queue;
028:        import javax.jms.TemporaryQueue;
029:        import javax.jms.TemporaryTopic;
030:        import javax.jms.Topic;
031:
032:        import org.jboss.mq.AcknowledgementRequest;
033:        import org.jboss.mq.ConnectionToken;
034:        import org.jboss.mq.DurableSubscriptionID;
035:        import org.jboss.mq.SpyDestination;
036:        import org.jboss.mq.SpyMessage;
037:        import org.jboss.mq.Subscription;
038:        import org.jboss.mq.TransactionRequest;
039:        import org.jboss.mq.il.ClientIL;
040:        import org.jboss.mq.il.ServerIL;
041:        import org.jboss.util.id.UID;
042:
043:        /**
044:         * DummyServerIL.
045:         * 
046:         * @author <a href="adrian@jboss.com">Adrian Brock</a>
047:         * @version $Revision: 1.1 $
048:         */
049:        public class DummyServerIL implements  ServerIL {
050:            private ClientIL clientIL;
051:
052:            private String when = "";
053:
054:            public void setThrowError(String when) {
055:                this .when = when;
056:            }
057:
058:            public void setClientIL(ClientIL clientIL) {
059:                this .clientIL = clientIL;
060:            }
061:
062:            public void acknowledge(ConnectionToken dc,
063:                    AcknowledgementRequest item) throws Exception {
064:                throw new org.jboss.util.NotImplementedException("acknowledge");
065:            }
066:
067:            public void addMessage(ConnectionToken dc, SpyMessage message)
068:                    throws Exception {
069:                throw new org.jboss.util.NotImplementedException("addMessage");
070:            }
071:
072:            public String authenticate(String userName, String password)
073:                    throws Exception {
074:                return UID.asString();
075:            }
076:
077:            public SpyMessage[] browse(ConnectionToken dc, Destination dest,
078:                    String selector) throws Exception {
079:                throw new org.jboss.util.NotImplementedException("browse");
080:            }
081:
082:            public void checkID(String ID) throws Exception {
083:                throw new org.jboss.util.NotImplementedException("checkID");
084:            }
085:
086:            public String checkUser(String userName, String password)
087:                    throws Exception {
088:                throw new org.jboss.util.NotImplementedException("checkUser");
089:            }
090:
091:            public ServerIL cloneServerIL() throws Exception {
092:                return this ;
093:            }
094:
095:            public void connectionClosing(ConnectionToken dc) throws Exception {
096:                throw new org.jboss.util.NotImplementedException(
097:                        "connectionClosing");
098:            }
099:
100:            public Queue createQueue(ConnectionToken dc, String dest)
101:                    throws Exception {
102:                throw new org.jboss.util.NotImplementedException("createQueue");
103:            }
104:
105:            public Topic createTopic(ConnectionToken dc, String dest)
106:                    throws Exception {
107:                throw new org.jboss.util.NotImplementedException("createTopic");
108:            }
109:
110:            public void deleteTemporaryDestination(ConnectionToken dc,
111:                    SpyDestination dest) throws Exception {
112:                throw new org.jboss.util.NotImplementedException(
113:                        "deleteTemporaryDestination");
114:            }
115:
116:            public void destroySubscription(ConnectionToken dc,
117:                    DurableSubscriptionID id) throws Exception {
118:                throw new org.jboss.util.NotImplementedException(
119:                        "destroySubscription");
120:            }
121:
122:            public String getID() throws Exception {
123:                return UID.asString();
124:            }
125:
126:            public TemporaryQueue getTemporaryQueue(ConnectionToken dc)
127:                    throws Exception {
128:                throw new org.jboss.util.NotImplementedException(
129:                        "getTemporaryQueue");
130:            }
131:
132:            public TemporaryTopic getTemporaryTopic(ConnectionToken dc)
133:                    throws Exception {
134:                throw new org.jboss.util.NotImplementedException(
135:                        "getTemporaryTopic");
136:            }
137:
138:            public void ping(ConnectionToken dc, long clientTime)
139:                    throws Exception {
140:                clientIL.pong(clientTime);
141:            }
142:
143:            public SpyMessage receive(ConnectionToken dc, int subscriberId,
144:                    long wait) throws Exception {
145:                if ("receive".equals(when))
146:                    throw new IOException("Error in receive");
147:                return null;
148:            }
149:
150:            public void setConnectionToken(ConnectionToken newConnectionToken)
151:                    throws Exception {
152:                // Nothing
153:            }
154:
155:            public void setEnabled(ConnectionToken dc, boolean enabled)
156:                    throws Exception {
157:                // Nothing
158:            }
159:
160:            public void subscribe(ConnectionToken dc, Subscription s)
161:                    throws Exception {
162:                // Nothing
163:            }
164:
165:            public void transact(ConnectionToken dc, TransactionRequest t)
166:                    throws Exception {
167:                throw new org.jboss.util.NotImplementedException("transact");
168:
169:            }
170:
171:            public void unsubscribe(ConnectionToken dc, int subscriptionId)
172:                    throws Exception {
173:                throw new org.jboss.util.NotImplementedException("unsubscribe");
174:            }
175:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.