Package com.levigo.jadice.server.client
Interface JobFactory
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
JMSJobFactory
public interface JobFactory extends AutoCloseable
A factory used to create instances ofJob
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
adopt(com.levigo.jadice.server.client.internal.DefaultJobInternalImpl job)
void
close()
Closes thisJobFactory
and releases all resources held by it.void
connect()
Performs all actions that are required beforeJob
s can be createdJob
createJob()
Create a job with the defaults as defined by the particular JobFactory implementation.
-
-
-
Method Detail
-
connect
void connect() throws ConnectionException
Performs all actions that are required beforeJob
s can be created- Throws:
ConnectionException
- if the connection to the underlying communication infrastructure could not be established
-
close
void close()
Closes thisJobFactory
and releases all resources held by it.If it is possible to
connect()
again is implementation specific. See the javadoc of the concrete implementation.- Specified by:
close
in interfaceAutoCloseable
-
createJob
Job createJob() throws JobException
Create a job with the defaults as defined by the particular JobFactory implementation.- Returns:
- a newly created job
- Throws:
JobException
- ifJob
creation failed
-
adopt
void adopt(com.levigo.jadice.server.client.internal.DefaultJobInternalImpl job) throws JobException
- Throws:
JobException
-
-