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, setServicepublic ALResourceManager(Session session) throws java.lang.Exception
java.lang.Exceptionpublic void createResourcesList(java.util.List<java.lang.String> resourceGroupName,
java.lang.String resourceName)
throws CallError,
java.lang.InterruptedException
resourceGroupName - Group name. Ex: ArmresourceName - Resource nameCallErrorjava.lang.InterruptedExceptionpublic java.lang.Object ownersGet()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Object getResources()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isStatsEnabled()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic void clearStats()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isTraceEnabled()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic void exit()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.String version()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean ping()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getMethodList()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Object getMethodHelp(java.lang.String methodName)
throws CallError,
java.lang.InterruptedException
methodName - The name of the method.CallErrorjava.lang.InterruptedExceptionpublic java.lang.Object getModuleHelp()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic 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.CallErrorjava.lang.InterruptedExceptionpublic 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'CallErrorjava.lang.InterruptedExceptionpublic void stop(java.lang.Integer id)
throws CallError,
java.lang.InterruptedException
id - the ID of the method to wait forCallErrorjava.lang.InterruptedExceptionpublic java.lang.String getBrokerName()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.String getUsage(java.lang.String name)
throws CallError,
java.lang.InterruptedException
name - The name of the method.CallErrorjava.lang.InterruptedExceptionpublic 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 secondsCallErrorjava.lang.InterruptedExceptionpublic 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 secondsCallErrorjava.lang.InterruptedExceptionpublic 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
CallErrorjava.lang.InterruptedExceptionpublic 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 secondsCallErrorjava.lang.InterruptedExceptionpublic 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 secondsCallErrorjava.lang.InterruptedExceptionpublic 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 hierarchyCallErrorjava.lang.InterruptedExceptionpublic void releaseResource(java.lang.String resourceName,
java.lang.String ownerName)
throws CallError,
java.lang.InterruptedException
resourceName - Resource nameownerName - Existing owner nameCallErrorjava.lang.InterruptedExceptionpublic void releaseResources(java.util.List<java.lang.String> resourceNames,
java.lang.String ownerName)
throws CallError,
java.lang.InterruptedException
resourceNames - Resource namesownerName - Owner nameCallErrorjava.lang.InterruptedExceptionpublic 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 disableCallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean checkStateResourceFree(java.util.List<java.lang.String> resourceName)
throws CallError,
java.lang.InterruptedException
resourceName - Resource nameCallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean areResourcesFree(java.util.List<java.lang.String> resourceNames)
throws CallError,
java.lang.InterruptedException
resourceNames - Resource namesCallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isResourceFree(java.lang.String resourceNames)
throws CallError,
java.lang.InterruptedException
resourceNames - Resource nameCallErrorjava.lang.InterruptedExceptionpublic 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 resourceCallErrorjava.lang.InterruptedExceptionpublic 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 trueCallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isInGroup(java.lang.String resourceGroupName,
java.lang.String resourceName)
throws CallError,
java.lang.InterruptedException
resourceGroupName - Group name. Ex: ArmresourceName - Resource nameCallErrorjava.lang.InterruptedExceptionAldebaran SDK for Java
Copyright 2006-2015 Aldebaran Robotics. All Rights Reserved.