public class SliceProxy extends java.lang.Object implements Service.Slice
Service.Slice
interface,
supporting routed dispatching of horizontal commands.Constructor and Description |
---|
SliceProxy() |
SliceProxy(Service svc,
Node n) |
Modifier and Type | Method and Description |
---|---|
Node |
getNode()
Access the node where this slice resides.
|
Service |
getService()
Access the service object which this slice is a part of.
|
VerticalCommand |
serve(HorizontalCommand cmd)
Try to serve an incoming horizontal command, routing it to
a remote slice implementation.
|
void |
setNode(Node n) |
public Service getService()
Service.Slice
getService
in interface Service.Slice
Service
object, that has
this
as one of its slices.Service.getSlice(String name)
public Node getNode() throws ServiceException
Service.Slice
getNode
in interface Service.Slice
ServiceException
- If some problems occur in
retrieving the local node.public void setNode(Node n)
public VerticalCommand serve(HorizontalCommand cmd)
serve
in interface Service.Slice
cmd
- The command to serve, possibly through the network.null
is returned, no filter/sink processing
will happen. This feature can be used to decouple incoming
horizontal interaction patterns from vertical incoming
commands (e.g. no incoming vertical command is generated
until a required set of horizontal commands has been
received).