public class Event extends XenAPIObject
Modifier and Type | Class and Description |
---|---|
static class |
Event.Record
Represents all the fields in a Event
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
ref
The XenAPI reference (OpaqueRef) to this object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
If obj is a Event, compares XenAPI references for equality.
|
static EventBatch |
from(Connection c,
java.util.Set<java.lang.String> classes,
java.lang.String token,
java.lang.Double timeout)
Blocking call which returns a new token and a (possibly empty) batch of events.
|
static java.lang.Long |
getCurrentId(Connection c)
Return the ID of the next event to be generated by the system
First published in XenServer 4.0.
|
int |
hashCode() |
static java.lang.String |
inject(Connection c,
java.lang.String clazz,
java.lang.String ref)
Injects an artificial event on the given object and returns the corresponding ID in the form of a token, which can be used as a point of reference for database events.
|
static java.util.Set<Event.Record> |
next(Connection c)
Deprecated.
|
static void |
register(Connection c,
java.util.Set<java.lang.String> classes)
Deprecated.
|
static Task |
registerAsync(Connection c,
java.util.Set<java.lang.String> classes)
Deprecated.
|
java.lang.String |
toWireString() |
static void |
unregister(Connection c,
java.util.Set<java.lang.String> classes)
Deprecated.
|
static Task |
unregisterAsync(Connection c,
java.util.Set<java.lang.String> classes)
Deprecated.
|
isNull
protected final java.lang.String ref
public java.lang.String toWireString()
toWireString
in class XenAPIObject
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
@Deprecated public static Task registerAsync(Connection c, java.util.Set<java.lang.String> classes) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onclasses
- the classes for which the session will register with the event system; specifying * as the desired class will register for all classesTypes.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.@Deprecated public static void register(Connection c, java.util.Set<java.lang.String> classes) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onclasses
- the classes for which the session will register with the event system; specifying * as the desired class will register for all classesTypes.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.@Deprecated public static Task unregisterAsync(Connection c, java.util.Set<java.lang.String> classes) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onclasses
- the classes for which the session's registration with the event system will be removedTypes.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.@Deprecated public static void unregister(Connection c, java.util.Set<java.lang.String> classes) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onclasses
- the classes for which the session's registration with the event system will be removedTypes.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.@Deprecated public static java.util.Set<Event.Record> next(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.SessionNotRegistered, Types.EventsLost
c
- The connection the call is made onTypes.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.Types.SessionNotRegistered
- This session is not registered to receive events. You must call event.register before event.next. The session handle you are using is echoed.Types.EventsLost
- Some events have been lost from the queue and cannot be retrieved.public static EventBatch from(Connection c, java.util.Set<java.lang.String> classes, java.lang.String token, java.lang.Double timeout) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.SessionNotRegistered, Types.EventsLost
c
- The connection the call is made onclasses
- register for events for the indicated classestoken
- A token representing the point from which to generate database events. The empty string represents the beginning.timeout
- Return after this many seconds if no events matchTypes.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.Types.SessionNotRegistered
- This session is not registered to receive events. You must call event.register before event.next. The session handle you are using is echoed.Types.EventsLost
- Some events have been lost from the queue and cannot be retrieved.public static java.lang.Long getCurrentId(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.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.public static java.lang.String inject(Connection c, java.lang.String clazz, java.lang.String ref) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onclazz
- class of the objectref
- A reference to the object that will be changed.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.