Package com.xensource.xenapi
Class Caller
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.Caller
XAPI caller description and rate limiting
First published in .
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents all the fields in a Caller -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroup(Connection c, String group) Add a caller to a group Minimum allowed role: pool-operator Experimental.addGroupAsync(Connection c, String group) Add a caller to a group Minimum allowed role: pool-operator Experimental.static Callercreate(Connection c, Caller.Record record) Create a new Caller instance, and return its handle.static TaskcreateAsync(Connection c, Caller.Record record) Create a new Caller instance, and return its handle.voidDestroy the specified Caller instance.Destroy the specified Caller instance.booleanIf obj is a Caller, compares XenAPI references for equality.getAll(Connection c) Return a list of all the Callers known to the system.static Map<Caller,Caller.Record> Return a map of Caller references to Caller records for all Callers known to the system.Get the auto_registered field of the given Caller.getByNameLabel(Connection c, String label) Get all the Caller instances with the given label.static CallergetByUuid(Connection c, String uuid) Get a reference to the Caller instance with the specified UUID.Get the client_ip field of the given Caller.Get the groups field of the given Caller.Get the last_access field of the given Caller.Get the name/description field of the given Caller.Get the name/label field of the given Caller.Get the rate_limit field of the given Caller.Get a record containing the current state of the given Caller.Get the user_agent field of the given Caller.Get the uuid field of the given Caller.inthashCode()Return per-caller usage for every known caller, sorted by token use descending.static TaskReturn per-caller usage for every known caller, sorted by token use descending.Return number of calls made by this caller since Xapi startup Minimum allowed role: pool-operator Experimental.Return number of calls made by this caller since Xapi startup Minimum allowed role: pool-operator Experimental.static LongqueryGroupCallCount(Connection c, String group) Return number of calls made since Xapi startup by the callers in the named group.static TaskqueryGroupCallCountAsync(Connection c, String group) Return number of calls made since Xapi startup by the callers in the named group.static DoublequeryGroupTokenUsage(Connection c, String group) Return tokens used since Xapi startup by the callers in the named group.static TaskqueryGroupTokenUsageAsync(Connection c, String group) Return tokens used since Xapi startup by the callers in the named group.Return tokens used by this caller since Xapi startup Minimum allowed role: pool-operator Experimental.Return tokens used by this caller since Xapi startup Minimum allowed role: pool-operator Experimental.voidremoveGroup(Connection c, String group) Remove a caller from a group Minimum allowed role: pool-operator Experimental.removeGroupAsync(Connection c, String group) Remove a caller from a group Minimum allowed role: pool-operator Experimental.voidsetNameDescription(Connection c, String description) Set the name/description field of the given Caller.voidsetNameLabel(Connection c, String label) Set the name/label field of the given Caller.Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Constructor Details
-
Caller
Creates an object from a given XenAPI reference (OpaqueRef)- Parameters:
ref- The OpaqueRef from which to create the object.
-
-
Method Details
-
toWireString
- Specified by:
toWireStringin classXenAPIObject- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a Caller, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public Caller.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a record containing the current state of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- all fields from the object
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByUuid
public static Caller getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a reference to the Caller instance with the specified UUID. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made onuuid- UUID of object to return- Returns:
- reference to the object
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
create
public static Caller create(Connection c, Caller.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException Create a new Caller instance, and return its handle. Minimum allowed role: pool-admin Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made onrecord- All constructor arguments- Returns:
- reference to the newly created object
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createAsync
public static Task createAsync(Connection c, Caller.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException Create a new Caller instance, and return its handle. Minimum allowed role: pool-admin Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made onrecord- All constructor arguments- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Destroy the specified Caller instance. Minimum allowed role: pool-admin Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Destroy the specified Caller instance. Minimum allowed role: pool-admin Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByNameLabel
public static Set<Caller> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException Get all the Caller instances with the given label. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made onlabel- label of object to return- Returns:
- references to objects with matching names
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the uuid field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameLabel
public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the name/label field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameDescription
public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the name/description field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUserAgent
public String getUserAgent(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the user_agent field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getClientIp
public String getClientIp(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the client_ip field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getLastAccess
public Date getLastAccess(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the last_access field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getGroups
public Set<String> getGroups(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the groups field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getRateLimit
public RateLimit getRateLimit(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the rate_limit field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAutoRegistered
public Boolean getAutoRegistered(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the auto_registered field of the given Caller. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameLabel
public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the name/label field of the given Caller. Minimum allowed role: pool-admin Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made onlabel- New value to set- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameDescription
public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the name/description field of the given Caller. Minimum allowed role: pool-admin Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made ondescription- New value to set- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addGroup
public void addGroup(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Add a caller to a group Minimum allowed role: pool-operator Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made ongroup- Group the caller is being added to- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addGroupAsync
public Task addGroupAsync(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Add a caller to a group Minimum allowed role: pool-operator Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made ongroup- Group the caller is being added to- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removeGroup
public void removeGroup(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Remove a caller from a group Minimum allowed role: pool-operator Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made ongroup- Group the caller is removed from- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removeGroupAsync
public Task removeGroupAsync(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Remove a caller from a group Minimum allowed role: pool-operator Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made ongroup- Group the caller is removed from- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryTokenUsage
public Double queryTokenUsage(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return tokens used by this caller since Xapi startup Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made on- Returns:
- Tokens used by the caller since Xapi startup
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryTokenUsageAsync
public Task queryTokenUsageAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return tokens used by this caller since Xapi startup Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryCallCount
public Long queryCallCount(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return number of calls made by this caller since Xapi startup Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made on- Returns:
- Calls made by the caller since Xapi startup
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryCallCountAsync
public Task queryCallCountAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return number of calls made by this caller since Xapi startup Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryGroupTokenUsage
public static Double queryGroupTokenUsage(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Return tokens used since Xapi startup by the callers in the named group. Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made ongroup- Caller group to aggregate over- Returns:
- Tokens used by the group since Xapi startup
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryGroupTokenUsageAsync
public static Task queryGroupTokenUsageAsync(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Return tokens used since Xapi startup by the callers in the named group. Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made ongroup- Caller group to aggregate over- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryGroupCallCount
public static Long queryGroupCallCount(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Return number of calls made since Xapi startup by the callers in the named group. Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made ongroup- Caller group to aggregate over- Returns:
- Number of calls made by the callers in the group
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryGroupCallCountAsync
public static Task queryGroupCallCountAsync(Connection c, String group) throws Types.BadServerResponse, Types.XenAPIException, IOException Return number of calls made since Xapi startup by the callers in the named group. Minimum allowed role: pool-operator Experimental. First published in 26.15.0.- Parameters:
c- The connection the call is made ongroup- Caller group to aggregate over- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryAllUsage
public static Set<Set<String>> queryAllUsage(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return per-caller usage for every known caller, sorted by token use descending. Minimum allowed role: pool-operator Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- Rows of [uuid; name_label; tokens; calls], highest tokens first
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
queryAllUsageAsync
public static Task queryAllUsageAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return per-caller usage for every known caller, sorted by token use descending. Minimum allowed role: pool-operator Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAll
public static Set<Caller> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a list of all the Callers known to the system. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- references to all objects
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllRecords
public static Map<Caller,Caller.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a map of Caller references to Caller records for all Callers known to the system. Minimum allowed role: read-only Experimental. First published in 26.17.0.- Parameters:
c- The connection the call is made on- Returns:
- records of all objects
- Throws:
Types.BadServerResponse- Thrown if the response from the server contains an invalid status.Types.XenAPIException- if the call failed.IOException- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-