Package org.apache.ofbiz.service.rmi
Interface RemoteDispatcher
- All Superinterfaces:
Remote
- All Known Implementing Classes:
RemoteDispatcherImpl
Generic Services Remote Dispatcher
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Run the service asynchronously and IGNORE the result.void
Run the service asynchronously and IGNORE the result.void
Run the service asynchronously, passing an instance of GenericRequester that will receive the result.void
runAsync
(String serviceName, Map<String, ? extends Object> context, GenericRequester requester, boolean persist) Run the service asynchronously, passing an instance of GenericRequester that will receive the result.void
runAsync
(String serviceName, Map<String, ? extends Object> context, GenericRequester requester, boolean persist, int transactionTimeout, boolean requireNewTransaction) Run the service asynchronously, passing an instance of GenericRequester that will receive the result.runAsyncWait
(String serviceName, Map<String, ? extends Object> context) Run the service asynchronously.runAsyncWait
(String serviceName, Map<String, ? extends Object> context, boolean persist) Run the service asynchronously.Run the service synchronously and return the result.runSync
(String serviceName, Map<String, ? extends Object> context, int transactionTimeout, boolean requireNewTransaction) Run the service synchronously with a specified timeout and return the result.void
runSyncIgnore
(String serviceName, Map<String, ? extends Object> context) Run the service synchronously and IGNORE the result.void
runSyncIgnore
(String serviceName, Map<String, ? extends Object> context, int transactionTimeout, boolean requireNewTransaction) Run the service synchronously with a specified timeout and IGNORE the result.void
Schedule a service to run asynchronously at a specific start time.void
schedule
(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) Schedule a service to run asynchronously at a specific start time.void
schedule
(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime) Schedule a service to run asynchronously at a specific start time.void
schedule
(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) Schedule a service to run asynchronously at a specific start time.
-
Method Details
-
runSync
Map<String,Object> runSync(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException, RemoteExceptionRun the service synchronously and return the result.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.- Returns:
- Map of name, value pairs composing the result.
- Throws:
GenericServiceException
RemoteException
-
runSync
Map<String,Object> runSync(String serviceName, Map<String, ? extends Object> context, int transactionTimeout, boolean requireNewTransaction) throws GenericServiceException, RemoteExceptionRun the service synchronously with a specified timeout and return the result.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.transactionTimeout
- the overriding timeout for the transaction (if we started it).requireNewTransaction
- if true we will suspend and create a new transaction so we are sure to start.- Returns:
- Map of name, value pairs composing the result.
- Throws:
GenericServiceException
RemoteException
-
runSyncIgnore
void runSyncIgnore(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException, RemoteExceptionRun the service synchronously and IGNORE the result.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.- Throws:
GenericServiceException
RemoteException
-
runSyncIgnore
void runSyncIgnore(String serviceName, Map<String, ? extends Object> context, int transactionTimeout, boolean requireNewTransaction) throws GenericServiceException, RemoteExceptionRun the service synchronously with a specified timeout and IGNORE the result.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.transactionTimeout
- the overriding timeout for the transaction (if we started it).requireNewTransaction
- if true we will suspend and create a new transaction so we are sure to start.- Throws:
GenericServiceException
RemoteException
-
runAsync
void runAsync(String serviceName, Map<String, ? extends Object> context, GenericRequester requester, boolean persist, int transactionTimeout, boolean requireNewTransaction) throws GenericServiceException, RemoteExceptionRun the service asynchronously, passing an instance of GenericRequester that will receive the result.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.requester
- Object implementing GenericRequester interface which will receive the result.persist
- True for store/run; False for run.transactionTimeout
- the overriding timeout for the transaction (if we started it).requireNewTransaction
- if true we will suspend and create a new transaction so we are sure to start.- Throws:
GenericServiceException
RemoteException
-
runAsync
void runAsync(String serviceName, Map<String, ? extends Object> context, GenericRequester requester, boolean persist) throws GenericServiceException, RemoteExceptionRun the service asynchronously, passing an instance of GenericRequester that will receive the result.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.requester
- Object implementing GenericRequester interface which will receive the result.persist
- True for store/run; False for run.- Throws:
GenericServiceException
RemoteException
-
runAsync
void runAsync(String serviceName, Map<String, ? extends Object> context, GenericRequester requester) throws GenericServiceException, RemoteExceptionRun the service asynchronously, passing an instance of GenericRequester that will receive the result. This method WILL persist the job.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.requester
- Object implementing GenericRequester interface which will receive the result.- Throws:
GenericServiceException
RemoteException
-
runAsync
void runAsync(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException, RemoteExceptionRun the service asynchronously and IGNORE the result.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.persist
- True for store/run; False for run.- Throws:
GenericServiceException
RemoteException
-
runAsync
void runAsync(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException, RemoteExceptionRun the service asynchronously and IGNORE the result. This method WILL persist the job.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.- Throws:
GenericServiceException
RemoteException
-
runAsyncWait
GenericResultWaiter runAsyncWait(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException, RemoteExceptionRun the service asynchronously.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.persist
- True for store/run; False for run.- Returns:
- A new GenericRequester object.
- Throws:
GenericServiceException
RemoteException
-
runAsyncWait
GenericResultWaiter runAsyncWait(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException, RemoteExceptionRun the service asynchronously. This method WILL persist the job.- Parameters:
serviceName
- Name of the service to run.context
- Map of name, value pairs composing the context.- Returns:
- A new GenericRequester object.
- Throws:
GenericServiceException
RemoteException
-
schedule
void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime) throws GenericServiceException, RemoteExceptionSchedule a service to run asynchronously at a specific start time.- Parameters:
serviceName
- Name of the service to invoke.context
- The name/value pairs composing the context.startTime
- The time to run this service.frequency
- The frequency of the recurrence (RecurrenceRule.DAILY, etc).interval
- The interval of the frequency recurrence.count
- The number of times to repeat.endTime
- The time in milliseconds the service should expire- Throws:
GenericServiceException
RemoteException
-
schedule
void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) throws GenericServiceException, RemoteExceptionSchedule a service to run asynchronously at a specific start time.- Parameters:
serviceName
- Name of the service to invoke.context
- The name/value pairs composing the context.startTime
- The time to run this service.frequency
- The frequency of the recurrence (RecurrenceRule.DAILY, etc).interval
- The interval of the frequency recurrence.count
- The number of times to repeat.- Throws:
GenericServiceException
RemoteException
-
schedule
void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException, RemoteExceptionSchedule a service to run asynchronously at a specific start time.- Parameters:
serviceName
- Name of the service to invoke.context
- The name/value pairs composing the context.startTime
- The time to run this service.frequency
- The frequency of the recurrence (RecurrenceRule.DAILY, etc).interval
- The interval of the frequency recurrence.endTime
- The time in milliseconds the service should expire- Throws:
GenericServiceException
RemoteException
-
schedule
void schedule(String serviceName, Map<String, ? extends Object> context, long startTime) throws GenericServiceException, RemoteExceptionSchedule a service to run asynchronously at a specific start time.- Parameters:
serviceName
- Name of the service to invoke.context
- The name/value pairs composing the context.startTime
- The time to run this service.- Throws:
GenericServiceException
RemoteException
-