public class ServerOperations extends Object
| Constructor and Description |
|---|
ServerOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
notify(Server server,
String pathPattern)
The Notify processor initiates notifications to observing clients.
|
void |
resourceAdd(Server server,
ResourceParams resourceParams)
The Resource Add processor dynamically adds a new resource to the CoAP server.
|
boolean |
resourceExists(Server server,
String pathPattern)
The Resource Exists processor checks whether the CoAP server has one or more resources
matching given uri pattern.
|
Set<String> |
resourceList(Server server,
String pathPattern)
Returns a list of uri's of the resources, that match given uri pattern.
|
void |
resourceRemove(Server server,
String pathPattern)
The Resource Remove processor removes resources from the CoAP server.
|
@Throws(value=ServerOperationErrorProvider.class) public void notify(@Config Server server, @Alias(value="pathPattern") @Summary(value="For resources that apply to the path-pattern notifications are issued.") @Example(value="/my_resources/*") String pathPattern) throws InvalidResourceUriException
server - The server configuration name of which the resource(s) have changed content.pathPattern - The path pattern specifies the resource(s) that have changed content. Wildcards can be used, like "/*" or "/some/deeper/resources/*".InvalidResourceUriException - Thrown when given uri pattern is invalid.@Throws(value=ServerOperationErrorProvider.class) public void resourceAdd(@Config Server server, @ParameterGroup(name="Resource to add") ResourceParams resourceParams) throws InvalidResourceUriException
server - The configuration name of the CoAP server to add the resource to.resourceParams - The builder that delivers the resource parameters.InvalidResourceUriException - When the uri has invalid value.@Throws(value=ServerOperationErrorProvider.class) public void resourceRemove(@Config Server server, @Alias(value="pathPattern") @Summary(value="Resources that apply to the path-pattern are removed.") @Example(value="/resources/*") String pathPattern) throws InvalidResourceUriException
server - The name of the CoAP server instance to use.pathPattern - The uri pattern of the resource(s) that will be deleted. Wildcards can be used, like "/*" or "/some/deeper/resources/*".InvalidResourceUriException - Thrown when given uri pattern is not valid.@Throws(value=ServerOperationErrorProvider.class) public boolean resourceExists(@Config Server server, @Alias(value="pathPattern") @Summary(value="If any resources that apply to the path-pattern exist true is retuned, otherwise false.") @Example(value="/resources/*") String pathPattern) throws InvalidResourceUriException
server - The configuration name of the CoAP server instance to use.pathPattern - The uri pattern of the resource(s) to be found. A wildcard can be used, e.g. "/tobefound/*".True when at least one resource is found to which the pattern applies, otherwise False.InvalidResourceUriException - When given resource uri is not valid@Throws(value=ServerOperationErrorProvider.class) public Set<String> resourceList(@Config Server server, @Alias(value="pathPattern") @Summary(value="Get the set of paths of the resources that apply to the path-pattern.") String pathPattern) throws InvalidResourceUriException
server - The server instance to list resources of.pathPattern - The uri pattern of the resource(s) to be found. A wildcard can be used, e.g. "/tobefound/*".InvalidResourceUriException - Thrown when given uri pattern is not valid.Copyright © 2019–2024 Teslanet.nl. All rights reserved.