public class ALResourceManager extends ALProxy
Constructor and Description |
---|
ALResourceManager(Session session) |
Modifier and Type | Method and Description |
---|---|
void |
acquireResource(java.lang.String resourceName,
java.lang.String moduleName,
java.lang.String callbackName,
java.lang.Integer timeoutSeconds)
Wait and acquire a resource
|
void |
acquireResourcesTree(java.util.List<java.lang.String> resourceName,
java.lang.String moduleName,
java.lang.String callbackName,
java.lang.Integer timeoutSeconds)
Wait for resource tree.
|
java.lang.Boolean |
areResourcesFree(java.util.List<java.lang.String> resourceNames)
True if all resources are free
|
java.lang.Boolean |
areResourcesOwnedBy(java.util.List<java.lang.String> resourceNameList,
java.lang.String ownerName)
True if all the specified resources are owned by the owner
|
java.lang.Boolean |
checkStateResourceFree(java.util.List<java.lang.String> resourceName)
check if all the state resource in the list are free
|
void |
clearStats() |
void |
createResource(java.lang.String resourceName,
java.lang.String parentResourceName)
Create a resource
|
void |
createResourcesList(java.util.List<java.lang.String> resourceGroupName,
java.lang.String resourceName)
True if a resource is in another parent resource
|
void |
deleteResource(java.lang.String resourceName,
java.lang.Boolean deleteChildResources)
Delete a root resource
|
void |
enableStateResource(java.lang.String resourceName,
java.lang.Boolean enabled)
Enable or disable a state resource
|
void |
exit()
Exits and unregisters the module.
|
java.lang.String |
getBrokerName()
Gets the name of the parent broker.
|
java.lang.Object |
getMethodHelp(java.lang.String methodName)
Retrieves a method's description.
|
java.util.List<java.lang.String> |
getMethodList()
Retrieves the module's method list.
|
java.lang.Object |
getModuleHelp()
Retrieves the module's description.
|
java.lang.Object |
getResources()
Get tree of resources
|
java.lang.String |
getUsage(java.lang.String name)
Gets the method usage string.
|
java.lang.Boolean |
isInGroup(java.lang.String resourceGroupName,
java.lang.String resourceName)
True if a resource is in another parent resource
|
java.lang.Boolean |
isResourceFree(java.lang.String resourceNames)
True if the resource is free
|
java.lang.Boolean |
isRunning(java.lang.Integer id)
Returns true if the method is currently running.
|
java.lang.Boolean |
isStatsEnabled() |
java.lang.Boolean |
isTraceEnabled() |
java.lang.Object |
ownersGet()
The tree of the resources owners.
|
java.lang.Boolean |
ping()
Just a ping.
|
void |
releaseResource(java.lang.String resourceName,
java.lang.String ownerName)
Release resource
|
void |
releaseResources(java.util.List<java.lang.String> resourceNames,
java.lang.String ownerName)
Release resources list
|
void |
stop(java.lang.Integer id)
returns true if the method is currently running
|
java.lang.String |
version()
Returns the version of the module.
|
java.lang.Boolean |
wait(java.lang.Integer id,
java.lang.Integer timeoutPeriod)
Wait for the end of a long running method that was called using 'post'
|
java.util.List<java.lang.String> |
waitForOptionalResourcesTree(java.util.List<java.lang.String> param1,
java.lang.String param2,
java.lang.String param3,
java.lang.Integer param4,
java.util.List<java.lang.String> param5)
Wait resource
|
void |
waitForResource(java.lang.String resourceName,
java.lang.String ownerName,
java.lang.String callbackName,
java.lang.Integer timeoutSeconds)
Wait resource
|
void |
waitForResourcesTree(java.util.List<java.lang.String> resourceName,
java.lang.String moduleName,
java.lang.String callbackName,
java.lang.Integer timeoutSeconds)
Wait for resource tree.
|
call, connect, connect, disconnect, getNaoqiType, getService, isProxyReady, setService
public ALResourceManager(Session session) throws java.lang.Exception
java.lang.Exception
public void createResourcesList(java.util.List<java.lang.String> resourceGroupName, java.lang.String resourceName) throws CallError, java.lang.InterruptedException
resourceGroupName
- Group name. Ex: ArmresourceName
- Resource nameCallError
java.lang.InterruptedException
public java.lang.Object ownersGet() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Object getResources() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean isStatsEnabled() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void clearStats() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean isTraceEnabled() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void exit() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String version() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean ping() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getMethodList() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Object getMethodHelp(java.lang.String methodName) throws CallError, java.lang.InterruptedException
methodName
- The name of the method.CallError
java.lang.InterruptedException
public java.lang.Object getModuleHelp() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean wait(java.lang.Integer id, java.lang.Integer timeoutPeriod) throws CallError, java.lang.InterruptedException
id
- The ID of the method that was returned when calling the method using 'post'timeoutPeriod
- The timeout period in ms. To wait indefinately, use a timeoutPeriod of zero.CallError
java.lang.InterruptedException
public java.lang.Boolean isRunning(java.lang.Integer id) throws CallError, java.lang.InterruptedException
id
- The ID of the method that was returned when calling the method using 'post'CallError
java.lang.InterruptedException
public void stop(java.lang.Integer id) throws CallError, java.lang.InterruptedException
id
- the ID of the method to wait forCallError
java.lang.InterruptedException
public java.lang.String getBrokerName() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String getUsage(java.lang.String name) throws CallError, java.lang.InterruptedException
name
- The name of the method.CallError
java.lang.InterruptedException
public void waitForResource(java.lang.String resourceName, java.lang.String ownerName, java.lang.String callbackName, java.lang.Integer timeoutSeconds) throws CallError, java.lang.InterruptedException
resourceName
- Resource nameownerName
- Module namecallbackName
- callback nametimeoutSeconds
- Timeout in secondsCallError
java.lang.InterruptedException
public void acquireResource(java.lang.String resourceName, java.lang.String moduleName, java.lang.String callbackName, java.lang.Integer timeoutSeconds) throws CallError, java.lang.InterruptedException
resourceName
- Resource namemoduleName
- Module namecallbackName
- callback nametimeoutSeconds
- Timeout in secondsCallError
java.lang.InterruptedException
public java.util.List<java.lang.String> waitForOptionalResourcesTree(java.util.List<java.lang.String> param1, java.lang.String param2, java.lang.String param3, java.lang.Integer param4, java.util.List<java.lang.String> param5) throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void waitForResourcesTree(java.util.List<java.lang.String> resourceName, java.lang.String moduleName, java.lang.String callbackName, java.lang.Integer timeoutSeconds) throws CallError, java.lang.InterruptedException
resourceName
- Resource namemoduleName
- Module namecallbackName
- callback nametimeoutSeconds
- Timeout in secondsCallError
java.lang.InterruptedException
public void acquireResourcesTree(java.util.List<java.lang.String> resourceName, java.lang.String moduleName, java.lang.String callbackName, java.lang.Integer timeoutSeconds) throws CallError, java.lang.InterruptedException
resourceName
- Resource namemoduleName
- Module namecallbackName
- callback nametimeoutSeconds
- Timeout in secondsCallError
java.lang.InterruptedException
public java.lang.Boolean areResourcesOwnedBy(java.util.List<java.lang.String> resourceNameList, java.lang.String ownerName) throws CallError, java.lang.InterruptedException
resourceNameList
- Resource nameownerName
- Owner pointer with hierarchyCallError
java.lang.InterruptedException
public void releaseResource(java.lang.String resourceName, java.lang.String ownerName) throws CallError, java.lang.InterruptedException
resourceName
- Resource nameownerName
- Existing owner nameCallError
java.lang.InterruptedException
public void releaseResources(java.util.List<java.lang.String> resourceNames, java.lang.String ownerName) throws CallError, java.lang.InterruptedException
resourceNames
- Resource namesownerName
- Owner nameCallError
java.lang.InterruptedException
public void enableStateResource(java.lang.String resourceName, java.lang.Boolean enabled) throws CallError, java.lang.InterruptedException
resourceName
- The name of the resource that you wish enable of disable. e.g. Standingenabled
- True to enable, false to disableCallError
java.lang.InterruptedException
public java.lang.Boolean checkStateResourceFree(java.util.List<java.lang.String> resourceName) throws CallError, java.lang.InterruptedException
resourceName
- Resource nameCallError
java.lang.InterruptedException
public java.lang.Boolean areResourcesFree(java.util.List<java.lang.String> resourceNames) throws CallError, java.lang.InterruptedException
resourceNames
- Resource namesCallError
java.lang.InterruptedException
public java.lang.Boolean isResourceFree(java.lang.String resourceNames) throws CallError, java.lang.InterruptedException
resourceNames
- Resource nameCallError
java.lang.InterruptedException
public void createResource(java.lang.String resourceName, java.lang.String parentResourceName) throws CallError, java.lang.InterruptedException
resourceName
- Resource name to createparentResourceName
- Parent resource name or empty string for root resourceCallError
java.lang.InterruptedException
public void deleteResource(java.lang.String resourceName, java.lang.Boolean deleteChildResources) throws CallError, java.lang.InterruptedException
resourceName
- Resource name to deletedeleteChildResources
- DEPRECATED: Delete child resources if trueCallError
java.lang.InterruptedException
public java.lang.Boolean isInGroup(java.lang.String resourceGroupName, java.lang.String resourceName) throws CallError, java.lang.InterruptedException
resourceGroupName
- Group name. Ex: ArmresourceName
- Resource nameCallError
java.lang.InterruptedException
Aldebaran SDK for Java
Copyright 2006-2015 Aldebaran Robotics. All Rights Reserved.