org.rhq.core.domain.event
Class EventSource

java.lang.Object
  extended by org.rhq.core.domain.event.EventSource
All Implemented Interfaces:
Externalizable, Serializable

public class EventSource
extends Object
implements Externalizable

An event source (e.g. a log file path or an SNMP trap OID) for a specific type of Event (see EventDefinition) and a specific Resource.

See Also:
Serialized Form

Field Summary
static String QUERY_BY_EVENT_DEFINITION
           
static String QUERY_DELETE_BY_RESOURCES
           
static String TABLE_NAME
           
 
Constructor Summary
EventSource()
           
EventSource(String location, EventDefinition eventDefinition, Resource resource)
           
 
Method Summary
 boolean equals(Object obj)
           
 EventDefinition getEventDefinition()
           
 Set<Event> getEvents()
           
 int getId()
           
 String getLocation()
           
 Resource getResource()
           
 int getResourceId()
           
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_NAME

public static final String TABLE_NAME
See Also:
Constant Field Values

QUERY_DELETE_BY_RESOURCES

public static final String QUERY_DELETE_BY_RESOURCES
See Also:
Constant Field Values

QUERY_BY_EVENT_DEFINITION

public static final String QUERY_BY_EVENT_DEFINITION
See Also:
Constant Field Values
Constructor Detail

EventSource

public EventSource()

EventSource

public EventSource(@NotNull
                   String location,
                   @NotNull
                   EventDefinition eventDefinition,
                   @NotNull
                   Resource resource)
Method Detail

getId

public int getId()

getEventDefinition

public EventDefinition getEventDefinition()

getResource

public Resource getResource()

getResourceId

public int getResourceId()

getLocation

@NotNull
public String getLocation()

getEvents

public Set<Event> getEvents()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.