Package com.xensource.xenapi
Class Message
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.Message
An message for the attention of the administrator
First published in XenServer 5.0.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents all the fields in a Message -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageMinimum allowed role: pool-operator First published in XenServer 5.0.voidMinimum allowed role: pool-operator First published in XenServer 5.0.static voiddestroyMany(Connection c, Set<Message> messages) Minimum allowed role: pool-operator Experimental.static TaskdestroyManyAsync(Connection c, Set<Message> messages) Minimum allowed role: pool-operator Experimental.booleanIf obj is a Message, compares XenAPI references for equality.static Map<Message,Message.Record> get(Connection c, Types.Cls cls, String objUuid, Date since) Minimum allowed role: read-only First published in XenServer 5.0.getAll(Connection c) Minimum allowed role: read-only First published in XenServer 5.0.static Map<Message,Message.Record> Minimum allowed role: read-only First published in XenServer 5.0.static Map<Message,Message.Record> getAllRecordsWhere(Connection c, String expr) Minimum allowed role: read-only First published in XenServer 5.0.static MessagegetByUuid(Connection c, String uuid) Minimum allowed role: read-only First published in XenServer 5.0.Minimum allowed role: read-only First published in XenServer 5.0.static Map<Message,Message.Record> getSince(Connection c, Date since) Minimum allowed role: read-only First published in XenServer 5.0.inthashCode()Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireStringin classXenAPIObject- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a Message, compares XenAPI references for equality. -
hashCode
public int hashCode() -
create
public static Message create(Connection c, String name, Long priority, Types.Cls cls, String objUuid, String body) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: pool-operator First published in XenServer 5.0.- Parameters:
c- The connection the call is made onname- The name of the messagepriority- The priority of the messagecls- The class of object this message is associated withobjUuid- The uuid of the object this message is associated withbody- The body of the message- Returns:
- The reference of the created message
- 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 Minimum allowed role: pool-operator First published in XenServer 5.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.
-
destroyMany
public static void destroyMany(Connection c, Set<Message> messages) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: pool-operator Experimental. First published in 22.19.0.- Parameters:
c- The connection the call is made onmessages- Messages to destroy- 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.
-
destroyManyAsync
public static Task destroyManyAsync(Connection c, Set<Message> messages) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: pool-operator Experimental. First published in 22.19.0.- Parameters:
c- The connection the call is made onmessages- Messages to destroy- 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.
-
get
public static Map<Message,Message.Record> get(Connection c, Types.Cls cls, String objUuid, Date since) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: read-only First published in XenServer 5.0.- Parameters:
c- The connection the call is made oncls- The class of objectobjUuid- The uuid of the objectsince- The cutoff time. When the timezone is missing, UTC is assumed- Returns:
- The relevant messages
- 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<Message> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: read-only First published in XenServer 5.0.- Parameters:
c- The connection the call is made on- Returns:
- The references to the messages
- 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.
-
getSince
public static Map<Message,Message.Record> getSince(Connection c, Date since) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: read-only First published in XenServer 5.0.- Parameters:
c- The connection the call is made onsince- The cutoff time. When the timezone is missing, UTC is assumed- Returns:
- The relevant messages
- 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.
-
getRecord
public Message.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: read-only First published in XenServer 5.0.- Parameters:
c- The connection the call is made on- Returns:
- The message record
- 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 Message getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: read-only First published in XenServer 5.0.- Parameters:
c- The connection the call is made onuuid- The uuid of the message- Returns:
- The message reference
- 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<Message,Message.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: read-only First published in XenServer 5.0.- Parameters:
c- The connection the call is made on- Returns:
- The messages
- 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.
-
getAllRecordsWhere
public static Map<Message,Message.Record> getAllRecordsWhere(Connection c, String expr) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: read-only First published in XenServer 5.0.- Parameters:
c- The connection the call is made onexpr- The expression to match- Returns:
- The messages
- 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.
-