Source Code Cross Referenced for LocalDispatcher.java in  » ERP-CRM-Financial » SourceTap-CRM » org » ofbiz » service » 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 » ERP CRM Financial » SourceTap CRM » org.ofbiz.service 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: LocalDispatcher.java,v 1.5 2004/02/19 18:52:35 ajzeneski Exp $
003:         *
004:         * Copyright (c) 2001, 2002 The Open For Business Project - www.ofbiz.org
005:         *
006:         * Permission is hereby granted, free of charge, to any person obtaining a
007:         * copy of this software and associated documentation files (the "Software"),
008:         * to deal in the Software without restriction, including without limitation
009:         * the rights to use, copy, modify, merge, publish, distribute, sublicense,
010:         * and/or sell copies of the Software, and to permit persons to whom the
011:         * Software is furnished to do so, subject to the following conditions:
012:         *
013:         * The above copyright notice and this permission notice shall be included
014:         * in all copies or substantial portions of the Software.
015:         *
016:         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
017:         * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
018:         * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
019:         * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
020:         * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
021:         * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
022:         * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
023:         *
024:         */
025:        package org.ofbiz.service;
026:
027:        import java.util.Map;
028:
029:        import org.ofbiz.entity.GenericDelegator;
030:        import org.ofbiz.security.Security;
031:        import org.ofbiz.service.jms.JmsListenerFactory;
032:        import org.ofbiz.service.job.JobManager;
033:
034:        /**
035:         * Generic Services Local Dispatcher
036:         *
037:         * @author     <a href="mailto:jaz@ofbiz.org">Andy Zeneski</a>
038:         * @version    $Revision: 1.5 $
039:         * @since      2.0
040:         */
041:        public interface LocalDispatcher {
042:
043:            /**
044:             * Run the service synchronously and return the result.
045:             * @param serviceName Name of the service to run.
046:             * @param context Map of name, value pairs composing the context.
047:             * @return Map of name, value pairs composing the result.
048:             * @throws ServiceAuthException
049:             * @throws ServiceValidationException
050:             * @throws GenericServiceException
051:             */
052:            public Map runSync(String serviceName, Map context)
053:                    throws GenericServiceException;
054:
055:            /**
056:             * Run the service synchronously with a specified timeout and return the result.
057:             * @param serviceName Name of the service to run.
058:             * @param context Map of name, value pairs composing the context.
059:             * @param transactionTimeout the overriding timeout for the transaction (if we started it).
060:             * @param requireNewTransaction if true we will suspend and create a new transaction so we are sure to start.
061:             * @return Map of name, value pairs composing the result.
062:             * @throws ServiceAuthException
063:             * @throws ServiceValidationException
064:             * @throws GenericServiceException
065:             */
066:            public Map runSync(String serviceName, Map context,
067:                    int transactionTimeout, boolean requireNewTransaction)
068:                    throws ServiceAuthException, ServiceValidationException,
069:                    GenericServiceException;
070:
071:            /**
072:             * Run the service synchronously and IGNORE the result.
073:             * @param serviceName Name of the service to run.
074:             * @param context Map of name, value pairs composing the context.
075:             * @throws ServiceAuthException
076:             * @throws ServiceValidationException
077:             * @throws GenericServiceException
078:             */
079:            public void runSyncIgnore(String serviceName, Map context)
080:                    throws GenericServiceException;
081:
082:            /**
083:             * Run the service synchronously with a specified timeout and IGNORE the result.
084:             * @param serviceName Name of the service to run.
085:             * @param context Map of name, value pairs composing the context.
086:             * @param transactionTimeout the overriding timeout for the transaction (if we started it).
087:             * @param requireNewTransaction if true we will suspend and create a new transaction so we are sure to start.
088:             * @throws ServiceAuthException
089:             * @throws ServiceValidationException
090:             * @throws GenericServiceException
091:             */
092:            public void runSyncIgnore(String serviceName, Map context,
093:                    int transactionTimeout, boolean requireNewTransaction)
094:                    throws ServiceAuthException, ServiceValidationException,
095:                    GenericServiceException;
096:
097:            /**
098:             * Run the service asynchronously, passing an instance of GenericRequester that will receive the result.
099:             * @param serviceName Name of the service to run.
100:             * @param context Map of name, value pairs composing the context.
101:             * @param requester Object implementing GenericRequester interface which will receive the result.
102:             * @param persist True for store/run; False for run.
103:             * @param transactionTimeout the overriding timeout for the transaction (if we started it).
104:             * @param requireNewTransaction if true we will suspend and create a new transaction so we are sure to start.
105:             * @throws ServiceAuthException
106:             * @throws ServiceValidationException
107:             * @throws GenericServiceException
108:             */
109:            public void runAsync(String serviceName, Map context,
110:                    GenericRequester requester, boolean persist,
111:                    int transactionTimeout, boolean requireNewTransaction)
112:                    throws ServiceAuthException, ServiceValidationException,
113:                    GenericServiceException;
114:
115:            /**
116:             * Run the service asynchronously, passing an instance of GenericRequester that will receive the result.
117:             * @param serviceName Name of the service to run.
118:             * @param context Map of name, value pairs composing the context.
119:             * @param requester Object implementing GenericRequester interface which will receive the result.
120:             * @param persist True for store/run; False for run.
121:             * @throws ServiceAuthException
122:             * @throws ServiceValidationException
123:             * @throws GenericServiceException
124:             */
125:            public void runAsync(String serviceName, Map context,
126:                    GenericRequester requester, boolean persist)
127:                    throws ServiceAuthException, ServiceValidationException,
128:                    GenericServiceException;
129:
130:            /**
131:             * Run the service asynchronously, passing an instance of GenericRequester that will receive the result.
132:             * This method WILL persist the job.
133:             * @param serviceName Name of the service to run.
134:             * @param context Map of name, value pairs composing the context.
135:             * @param requester Object implementing GenericRequester interface which will receive the result.
136:             * @throws ServiceAuthException
137:             * @throws ServiceValidationException
138:             * @throws GenericServiceException
139:             */
140:            public void runAsync(String serviceName, Map context,
141:                    GenericRequester requester) throws ServiceAuthException,
142:                    ServiceValidationException, GenericServiceException;
143:
144:            /**
145:             * Run the service asynchronously and IGNORE the result.
146:             * @param serviceName Name of the service to run.
147:             * @param context Map of name, value pairs composing the context.
148:             * @param persist True for store/run; False for run.
149:             * @throws ServiceAuthException
150:             * @throws ServiceValidationException
151:             * @throws GenericServiceException
152:             */
153:            public void runAsync(String serviceName, Map context,
154:                    boolean persist) throws ServiceAuthException,
155:                    ServiceValidationException, GenericServiceException;
156:
157:            /**
158:             * Run the service asynchronously and IGNORE the result. This method WILL persist the job.
159:             * @param serviceName Name of the service to run.
160:             * @param context Map of name, value pairs composing the context.
161:             * @throws ServiceAuthException
162:             * @throws ServiceValidationException
163:             * @throws GenericServiceException
164:             */
165:            public void runAsync(String serviceName, Map context)
166:                    throws ServiceAuthException, ServiceValidationException,
167:                    GenericServiceException;
168:
169:            /**
170:             * Run the service asynchronously.
171:             * @param serviceName Name of the service to run.
172:             * @param context Map of name, value pairs composing the context.
173:             * @param persist True for store/run; False for run.
174:             * @return A new GenericRequester object.
175:             * @throws ServiceAuthException
176:             * @throws ServiceValidationException
177:             * @throws GenericServiceException
178:             */
179:            public GenericResultWaiter runAsyncWait(String serviceName,
180:                    Map context, boolean persist) throws ServiceAuthException,
181:                    ServiceValidationException, GenericServiceException;
182:
183:            /**
184:             * Run the service asynchronously. This method WILL persist the job.
185:             * @param serviceName Name of the service to run.
186:             * @param context Map of name, value pairs composing the context.
187:             * @return A new GenericRequester object.
188:             * @throws ServiceAuthException
189:             * @throws ServiceValidationException
190:             * @throws GenericServiceException
191:             */
192:            public GenericResultWaiter runAsyncWait(String serviceName,
193:                    Map context) throws ServiceAuthException,
194:                    ServiceValidationException, GenericServiceException;
195:
196:            /**
197:             * Schedule a service to run asynchronously at a specific start time.
198:             * @param poolName Name of the service pool to send to.
199:             * @param serviceName Name of the service to invoke.
200:             * @param context The name/value pairs composing the context.
201:             * @param startTime The time to run this service.
202:             * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
203:             * @param interval The interval of the frequency recurrence.
204:             * @param count The number of times to repeat.
205:             * @param endTime The time in milliseconds the service should expire
206:             * @throws ServiceAuthException
207:             * @throws ServiceValidationException
208:             * @throws GenericServiceException
209:             */
210:            public void schedule(String poolName, String serviceName,
211:                    Map context, long startTime, int frequency, int interval,
212:                    int count, long endTime) throws GenericServiceException;
213:
214:            /**
215:             * Schedule a service to run asynchronously at a specific start time.
216:             * @param serviceName Name of the service to invoke.
217:             * @param context The name/value pairs composing the context.
218:             * @param startTime The time to run this service.
219:             * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
220:             * @param interval The interval of the frequency recurrence.
221:             * @param count The number of times to repeat.
222:             * @param endTime The time in milliseconds the service should expire
223:             * @throws GenericServiceException
224:             */
225:            public void schedule(String serviceName, Map context,
226:                    long startTime, int frequency, int interval, int count,
227:                    long endTime) throws GenericServiceException;
228:
229:            /**
230:             * Schedule a service to run asynchronously at a specific start time.
231:             * @param serviceName Name of the service to invoke.
232:             * @param context The name/value pairs composing the context.
233:             * @param startTime The time to run this service.
234:             * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
235:             * @param interval The interval of the frequency recurrence.
236:             * @param count The number of times to repeat.
237:             * @throws GenericServiceException
238:             */
239:            public void schedule(String serviceName, Map context,
240:                    long startTime, int frequency, int interval, int count)
241:                    throws GenericServiceException;
242:
243:            /**
244:             * Schedule a service to run asynchronously at a specific start time.
245:             * @param serviceName Name of the service to invoke.
246:             * @param context The name/value pairs composing the context.
247:             * @param startTime The time to run this service.
248:             * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
249:             * @param interval The interval of the frequency recurrence.
250:             * @param endTime The time in milliseconds the service should expire
251:             * @throws GenericServiceException
252:             */
253:            public void schedule(String serviceName, Map context,
254:                    long startTime, int frequency, int interval, long endTime)
255:                    throws GenericServiceException;
256:
257:            /**
258:             * Schedule a service to run asynchronously at a specific start time.
259:             * @param serviceName Name of the service to invoke.
260:             * @param context The name/value pairs composing the context.
261:             * @param startTime The time to run this service.
262:             * @throws GenericServiceException
263:             */
264:            public void schedule(String serviceName, Map context, long startTime)
265:                    throws GenericServiceException;
266:
267:            /**
268:             * Gets the JobManager associated with this dispatcher
269:             * @return JobManager that is associated with this dispatcher
270:             */
271:            public JobManager getJobManager();
272:
273:            /**
274:             * Gets the JmsListenerFactory which holds the message listeners.
275:             * @return JmsListenerFactory
276:             */
277:            public JmsListenerFactory getJMSListeneFactory();
278:
279:            /**
280:             * Gets the GenericEntityDelegator associated with this dispatcher
281:             * @return GenericEntityDelegator associated with this dispatcher
282:             */
283:            public GenericDelegator getDelegator();
284:
285:            /**
286:             * Gets the Security object associated with this dispatcher
287:             * @return Security object associated with this dispatcher
288:             */
289:            public Security getSecurity();
290:
291:            /**
292:             * Returns the Name of this local dispatcher
293:             * @return String representing the name of this local dispatcher
294:             */
295:            public String getName();
296:
297:            /**
298:             * Returns the DispatchContext created by this dispatcher
299:             * @return DispatchContext created by this dispatcher
300:             */
301:            public DispatchContext getDispatchContext();
302:
303:            /**
304:             * De-Registers this LocalDispatcher with the ServiceDispatcher
305:             */
306:            public void deregister();
307:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.