com.xensource.xenapi
Class Message

java.lang.Object
  extended by com.xensource.xenapi.XenAPIObject
      extended by com.xensource.xenapi.Message

public class Message
extends XenAPIObject

An message for the attention of the administrator First published in XenServer 5.0.


Nested Class Summary
static class Message.Record
          Represents all the fields in a Message
 
Field Summary
protected  java.lang.String ref
          The XenAPI reference (OpaqueRef) to this object.
 
Method Summary
static Message create(Connection c, java.lang.String name, java.lang.Long priority, Types.Cls cls, java.lang.String objUuid, java.lang.String body)
          First published in XenServer 5.0.
 void destroy(Connection c)
          First published in XenServer 5.0.
 boolean equals(java.lang.Object obj)
          If obj is a Message, compares XenAPI references for equality.
static java.util.Map<Message,Message.Record> get(Connection c, Types.Cls cls, java.lang.String objUuid, java.util.Date since)
          First published in XenServer 5.0.
static java.util.Set<Message> getAll(Connection c)
          First published in XenServer 5.0.
static java.util.Map<Message,Message.Record> getAllRecords(Connection c)
          First published in XenServer 5.0.
static java.util.Map<Message,Message.Record> getAllRecordsWhere(Connection c, java.lang.String expr)
          First published in XenServer 5.0.
static Message getByUuid(Connection c, java.lang.String uuid)
          First published in XenServer 5.0.
 Message.Record getRecord(Connection c)
          First published in XenServer 5.0.
static java.util.Map<Message,Message.Record> getSince(Connection c, java.util.Date since)
          First published in XenServer 5.0.
 int hashCode()
           
 java.lang.String toWireString()
           
 
Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final java.lang.String ref
The XenAPI reference (OpaqueRef) to this object.

Method Detail

toWireString

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

equals

public boolean equals(java.lang.Object obj)
If obj is a Message, compares XenAPI references for equality.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

create

public static Message create(Connection c,
                             java.lang.String name,
                             java.lang.Long priority,
                             Types.Cls cls,
                             java.lang.String objUuid,
                             java.lang.String body)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Parameters:
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
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

destroy

public void destroy(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

get

public static java.util.Map<Message,Message.Record> get(Connection c,
                                                        Types.Cls cls,
                                                        java.lang.String objUuid,
                                                        java.util.Date since)
                                                 throws Types.BadServerResponse,
                                                        Types.XenAPIException,
                                                        org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Parameters:
cls - The class of object
objUuid - The uuid of the object
since - The cutoff time
Returns:
The relevant messages
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAll

public static java.util.Set<Message> getAll(Connection c)
                                     throws Types.BadServerResponse,
                                            Types.XenAPIException,
                                            org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Returns:
The references to the messages
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getSince

public static java.util.Map<Message,Message.Record> getSince(Connection c,
                                                             java.util.Date since)
                                                      throws Types.BadServerResponse,
                                                             Types.XenAPIException,
                                                             org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Parameters:
since - The cutoff time
Returns:
The relevant messages
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getRecord

public Message.Record getRecord(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Returns:
The message record
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getByUuid

public static Message getByUuid(Connection c,
                                java.lang.String uuid)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Parameters:
uuid - The uuid of the message
Returns:
The message reference
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAllRecords

public static java.util.Map<Message,Message.Record> getAllRecords(Connection c)
                                                           throws Types.BadServerResponse,
                                                                  Types.XenAPIException,
                                                                  org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Returns:
The messages
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAllRecordsWhere

public static java.util.Map<Message,Message.Record> getAllRecordsWhere(Connection c,
                                                                       java.lang.String expr)
                                                                throws Types.BadServerResponse,
                                                                       Types.XenAPIException,
                                                                       org.apache.xmlrpc.XmlRpcException
First published in XenServer 5.0.

Parameters:
expr - The expression to match (not currently used)
Returns:
The messages
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException