public class InvocationWorkerBuilder
extends java.lang.Object
InvocationWorker
.Constructor and Description |
---|
InvocationWorkerBuilder()
Begin constructing the InvocationWorker.
|
InvocationWorkerBuilder(InvocationGridStartup startup)
Begin constructing the InvocationWorker.
|
InvocationWorkerBuilder(java.util.Properties properties)
Begin constructing the InvocationWorker.
|
InvocationWorkerBuilder(java.lang.String additionalConnectionStringProperties)
Begin constructing the InvocationWorker.
|
InvocationWorkerBuilder(java.lang.String additionalConnectionStringProperties,
InvocationGridStartup startup)
Begin constructing the InvocationWorker.
|
Modifier and Type | Method and Description |
---|---|
InvocationWorker |
build()
Builds the
InvocationWorker as specified by the constructor and optional changes. |
GridConnection |
getGridConnection()
Retrieve the
GridConnection used by this builder. |
int |
getInvocationGridId()
Retrieve the InvocationGrid ID used by this builder.
|
InvocationWorkerBuilder |
withInvocationGridSignalHandler(InvocationGridSignal signal,
InvocationGridSignalHandler handler)
Adds an extra user defined
InvocationGridSignalHandler for the defined InvocationGridSignal . |
public InvocationWorkerBuilder()
public InvocationWorkerBuilder(java.lang.String additionalConnectionStringProperties)
additionalConnectionStringProperties
- additional connection string properties.public InvocationWorkerBuilder(InvocationGridStartup startup)
InvocationGridStartup
will be called once InvocationWorker
is built and InvocationWorker.waitForEvents()
is called. Default connection string used: "bootstrapGateways=127.0.0.1:721;maxPoolSize=4"startup
- a user defined InvocationGridStartup callback.public InvocationWorkerBuilder(java.lang.String additionalConnectionStringProperties, InvocationGridStartup startup)
InvocationGridStartup
will be called once InvocationWorker
is built and InvocationWorker.waitForEvents()
is called.
Connection string used will append parameter additional properties: "bootstrapGateways=127.0.0.1:721;%s"additionalConnectionStringProperties
- additional connection string properties.startup
- a user defined InvocationGridStartup callback.public InvocationWorkerBuilder(java.util.Properties properties)
InvocationGridStartup
will be called once InvocationWorker
is built and
InvocationWorker.waitForEvents()
is called.
Connection string used will append parameter additional properties: "bootstrapGateways=127.0.0.1:721;%s"properties
- properties file that should load the invocation grid configuration.public InvocationWorkerBuilder withInvocationGridSignalHandler(InvocationGridSignal signal, InvocationGridSignalHandler handler)
InvocationGridSignalHandler
for the defined InvocationGridSignal
.signal
- the signal type.handler
- the handler type.public GridConnection getGridConnection()
GridConnection
used by this builder.public int getInvocationGridId()
public InvocationWorker build() throws GridConnectException
InvocationWorker
as specified by the constructor and optional changes.GridConnectException
- if the builder is unable to connect to the ScaleOut StateServer service.