public abstract class AbstractWorkerFactoryImpl<R extends Endpoint<R,L>,L extends Endpoint<L,R>> extends Object implements WorkerFactory<R,L>
| Constructor and Description |
|---|
AbstractWorkerFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract R |
create(MessagePort worker)
build the actual instance to connect
|
R |
createDedicatedWorker(String pathToJs,
L local)
Creates a worker with the remote JS connected to the local endpoint.
|
R |
createSharedWorker(String pathToJs,
L local) |
R |
wrapRemoteMessagePort(MessagePort remote,
L local) |
public R createDedicatedWorker(String pathToJs, L local)
WorkerFactorycreateDedicatedWorker in interface WorkerFactory<R extends Endpoint<R,L>,L extends Endpoint<L,R>>pathToJs - the path to the JS file which will describe this workerlocal - the local interface which the new remote worker can send messages topublic R createSharedWorker(String pathToJs, L local)
createSharedWorker in interface WorkerFactory<R extends Endpoint<R,L>,L extends Endpoint<L,R>>public R wrapRemoteMessagePort(MessagePort remote, L local)
wrapRemoteMessagePort in interface WorkerFactory<R extends Endpoint<R,L>,L extends Endpoint<L,R>>protected abstract R create(MessagePort worker)
Copyright © 2011–2018 Vertispan LLC. All rights reserved.