Class Message


public class Message extends XenAPIObject
An message for the attention of the administrator First published in XenServer 5.0.
Author:
Cloud Software Group, Inc.
  • Field Details

    • ref

      protected final String ref
      The XenAPI reference (OpaqueRef) to this object.
  • Method Details

    • toWireString

      public String toWireString()
      Specified by:
      toWireString in class XenAPIObject
      Returns:
      The XenAPI reference (OpaqueRef) to this object.
    • equals

      public boolean equals(Object obj)
      If obj is a Message, compares XenAPI references for equality.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static Message create(Connection c, String name, Long priority, Types.Cls cls, String objUuid, String body) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Minimum allowed role: pool-operator First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      name - The name of the message
      priority - The priority of the message
      cls - The class of object this message is associated with
      objUuid - The uuid of the object this message is associated with
      body - 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 - 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
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • destroyManyAsync

      public static Task destroyManyAsync(Connection c, Set<Message> messages) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Minimum allowed role: pool-operator Experimental. First published in 22.19.0.
      Parameters:
      c - The connection the call is made on
      messages - Messages to destroy
      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.
    • destroyMany

      public static void destroyMany(Connection c, Set<Message> messages) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Minimum allowed role: pool-operator Experimental. First published in 22.19.0.
      Parameters:
      c - The connection the call is made on
      messages - Messages to destroy
      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.
    • get

      public static Map<Message,Message.Record> get(Connection c, Types.Cls cls, String objUuid, Date since) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Minimum allowed role: read-only First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      cls - The class of object
      objUuid - The uuid of the object
      since - The cutoff time
      Returns:
      The relevant messages
      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<Message> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getSince

      public static Map<Message,Message.Record> getSince(Connection c, Date since) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Minimum allowed role: read-only First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      since - The cutoff time
      Returns:
      The relevant messages
      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.
    • getRecord

      public Message.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getByUuid

      public static Message getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Minimum allowed role: read-only First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      uuid - 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 - 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<Message,Message.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getAllRecordsWhere

      public static Map<Message,Message.Record> getAllRecordsWhere(Connection c, String expr) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Minimum allowed role: read-only First published in XenServer 5.0.
      Parameters:
      c - The connection the call is made on
      expr - The expression to match (not currently used)
      Returns:
      The messages
      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.