public abstract class WorkerObject extends Object implements DispatchTarget, Encodable, Referenceable
Constructor and Description |
---|
WorkerObject(String serviceName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Overridable hook for subclasses to be notified about activation.
|
JSONLiteral |
encode(EncodeControl control)
Produce a
JSONLiteral representing the encoded state of this
object, suitable for transmission over a messaging medium or for writing
to persistent storage. |
String |
ref()
Obtain this object's reference string.
|
protected Workshop |
workshop()
Obtain the workshop for this server.
|
public WorkerObject(String serviceName)
serviceName
- Service name to register with broker, or null for
none.public void activate()
protected Workshop workshop()
public JSONLiteral encode(EncodeControl control)
JSONLiteral
representing the encoded state of this
object, suitable for transmission over a messaging medium or for writing
to persistent storage. The default implementation makes this object
not actually encodable, but subclasses can override.encode
in interface Encodable
control
- Encode control determining what flavor of encoding
should be done.JSONLiteral
representing the encoded state of this
object.public String ref()
ref
in interface Referenceable
Copyright © 2017. All rights reserved.