CloudioEndpoint
public interface CloudioEndpointService
Modifier and Type | Method | Description |
---|---|---|
void |
addEndpointListener(CloudioEndpointListener listener) |
Adds the given listener to the endpoint service.
|
void |
addNode(java.lang.String nodeName,
CloudioNode node) |
Adds the given node to the endpoint.
|
<T extends CloudioNode> |
addNode(java.lang.String nodeName,
java.lang.Class<T> nodeClass) |
Adds a new node instance of the given node class to the endpoint.
|
<T extends CloudioNode> |
getNode(java.lang.String nodeName) |
Returns the node with the given name that was registered within cloud.iO or null if no such node is present.
|
boolean |
isOnline() |
Returns true if the endpoint is connected to the central message broker, otherwise false.
|
void |
removeEndpointListener(CloudioEndpointListener listener) |
Removes the given listener from the endpoint service.
|
void |
removeNode(CloudioNode node) |
Removes the given node from the endpoint if the node actually is part of the endpoint.
|
void |
removeNode(java.lang.String nodeName) |
Removes the node with the given name from the endpoint if the node actually is part of the endpoint.
|
boolean isOnline()
void addEndpointListener(CloudioEndpointListener listener)
listener
- Listener to add.void removeEndpointListener(CloudioEndpointListener listener)
listener
- Listener to add.void addNode(java.lang.String nodeName, CloudioNode node) throws DuplicateNamedItemException
DuplicateNamedItemException
.nodeName
- Name to give to the node.node
- Reference to the node instance to add.DuplicateNamedItemException
- If a node with the given name already exists.<T extends CloudioNode> T addNode(java.lang.String nodeName, java.lang.Class<T> nodeClass) throws InvalidCloudioNodeException, DuplicateNamedItemException
DuplicateNamedItemException
. Note that the node class must dispose
a default constructor in order to let the method create an instance of the class.T
- Type of the node class.nodeName
- Name to give to the node.nodeClass
- The class of the node to instantiate.DuplicateNamedItemException
- If a node with the given name already exists.InvalidCloudioNodeException
void removeNode(CloudioNode node)
node
- Node to remove.void removeNode(java.lang.String nodeName)
nodeName
- Name of the node to remove.<T extends CloudioNode> T getNode(java.lang.String nodeName) throws java.lang.ClassCastException
T
- Subclass of node.nodeName
- Name of the node to return a reference to.java.lang.ClassCastException
- If the node could not be casted to the target type