Package com.xensource.xenapi
Class Observer
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.Observer
Describes a observer which will control observability activity in the Toolstack
First published in .
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents all the fields in a Observer -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Observer
create
(Connection c, Observer.Record record) Create a new Observer instance, and return its handle.static Task
createAsync
(Connection c, Observer.Record record) Create a new Observer instance, and return its handle.void
Destroy the specified Observer instance.Destroy the specified Observer instance.boolean
If obj is a Observer, compares XenAPI references for equality.getAll
(Connection c) Return a list of all the Observers known to the system.static Map<Observer,
Observer.Record> Return a map of Observer references to Observer records for all Observers known to the system.Get the attributes field of the given Observer.getByNameLabel
(Connection c, String label) Get all the Observer instances with the given label.static Observer
getByUuid
(Connection c, String uuid) Get a reference to the Observer instance with the specified UUID.Get the components field of the given Observer.Get the enabled field of the given Observer.Get the endpoints field of the given Observer.Get the hosts field of the given Observer.Get the name/description field of the given Observer.Get the name/label field of the given Observer.Get a record containing the current state of the given Observer.Get the uuid field of the given Observer.int
hashCode()
void
setAttributes
(Connection c, Map<String, String> value) Set the attributes of an observer.setAttributesAsync
(Connection c, Map<String, String> value) Set the attributes of an observer.void
setComponents
(Connection c, Set<String> value) Set the components on which the observer will broadcast to.setComponentsAsync
(Connection c, Set<String> value) Set the components on which the observer will broadcast to.void
setEnabled
(Connection c, Boolean value) Enable / disable this observer which will stop the observer from producing observability information Minimum allowed role: pool-admin Experimental.setEnabledAsync
(Connection c, Boolean value) Enable / disable this observer which will stop the observer from producing observability information Minimum allowed role: pool-admin Experimental.void
setEndpoints
(Connection c, Set<String> value) Set the file/HTTP endpoints the observer sends data to Minimum allowed role: pool-admin Experimental.setEndpointsAsync
(Connection c, Set<String> value) Set the file/HTTP endpoints the observer sends data to Minimum allowed role: pool-admin Experimental.void
setHosts
(Connection c, Set<Host> value) Sets the hosts that the observer is to be registered on Minimum allowed role: pool-admin Experimental.setHostsAsync
(Connection c, Set<Host> value) Sets the hosts that the observer is to be registered on Minimum allowed role: pool-admin Experimental.void
setNameDescription
(Connection c, String description) Set the name/description field of the given Observer.void
setNameLabel
(Connection c, String label) Set the name/label field of the given Observer.Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a Observer, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public Observer.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get a record containing the current state of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getByUuid
public static Observer getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get a reference to the Observer instance with the specified UUID. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
createAsync
public static Task createAsync(Connection c, Observer.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Create a new Observer instance, and return its handle. Minimum allowed role: pool-admin Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
create
public static Observer create(Connection c, Observer.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Create a new Observer instance, and return its handle. Minimum allowed role: pool-admin Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Destroy the specified Observer instance. Minimum allowed role: pool-admin Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Destroy the specified Observer instance. Minimum allowed role: pool-admin Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getByNameLabel
public static Set<Observer> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get all the Observer instances with the given label. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the uuid field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getNameLabel
public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the name/label field of the given Observer. Minimum allowed role: read-only First published in XenServer 4.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getNameDescription
public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the name/description field of the given Observer. Minimum allowed role: read-only First published in XenServer 4.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getHosts
public Set<Host> getHosts(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the hosts field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getAttributes
public Map<String,String> getAttributes(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the attributes field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getEndpoints
public Set<String> getEndpoints(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the endpoints field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getComponents
public Set<String> getComponents(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the components field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getEnabled
public Boolean getEnabled(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Get the enabled field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setNameLabel
public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the name/label field of the given Observer. Minimum allowed role: pool-admin First published in XenServer 4.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setNameDescription
public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the name/description field of the given Observer. Minimum allowed role: pool-admin First published in XenServer 4.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setHostsAsync
public Task setHostsAsync(Connection c, Set<Host> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Sets the hosts that the observer is to be registered on Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- Hosts the observer is registered on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setHosts
public void setHosts(Connection c, Set<Host> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Sets the hosts that the observer is to be registered on Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- Hosts the observer is registered on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setEnabledAsync
public Task setEnabledAsync(Connection c, Boolean value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Enable / disable this observer which will stop the observer from producing observability information Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- If the observer is to be enabled (true) or disabled (false)- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setEnabled
public void setEnabled(Connection c, Boolean value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Enable / disable this observer which will stop the observer from producing observability information Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- If the observer is to be enabled (true) or disabled (false)- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setAttributesAsync
public Task setAttributesAsync(Connection c, Map<String, String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcExceptionSet the attributes of an observer. These are used to emit metadata by the observer Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- The attributes that the observer emits as part of the data- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setAttributes
public void setAttributes(Connection c, Map<String, String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcExceptionSet the attributes of an observer. These are used to emit metadata by the observer Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- The attributes that the observer emits as part of the data- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setEndpointsAsync
public Task setEndpointsAsync(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the file/HTTP endpoints the observer sends data to Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- The endpoints that the observer will export data to. A URL or the string 'bugtool'. This can refer to an enpoint to the local file system- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setEndpoints
public void setEndpoints(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the file/HTTP endpoints the observer sends data to Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- The endpoints that the observer will export data to. A URL or the string 'bugtool'. This can refer to an enpoint to the local file system- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setComponentsAsync
public Task setComponentsAsync(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the components on which the observer will broadcast to. i.e. xapi, xenopsd, networkd, etc Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- The components the observer will broadcast to- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
setComponents
public void setComponents(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Set the components on which the observer will broadcast to. i.e. xapi, xenopsd, networkd, etc Minimum allowed role: pool-admin Experimental. First published in 23.14.0.- Parameters:
c
- The connection the call is made onvalue
- The components the observer will broadcast to- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getAll
public static Set<Observer> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Return a list of all the Observers known to the system. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getAllRecords
public static Map<Observer,Observer.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException Return a map of Observer references to Observer records for all Observers known to the system. Minimum allowed role: read-only Experimental. First published in 23.14.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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-