Package fish.payara.micro.event
Interface PayaraClusteredCDIEvent
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PayaraClusteredCDIEventImpl
public interface PayaraClusteredCDIEvent extends Serializable
Interface that classes must implement to be used as Clustered Events- Author:
- Steve Millidge
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddQualifiers(Set<Annotation> qualifiers)Adds the set of qualifiers to the eventInstanceDescriptorgetId()Return the Instance Descriptor of the senderInstanceDescriptorgetInstanceDescriptor()Returns the Instance Descriptor of the SenderSerializablegetPayload()Returns the Payload of the object.PropertiesgetProperties()Returns the set of properties in the eventStringgetProperty(String name)Returns the property value with the specified nameStringgetProperty(String name, String defaultValue)Returns the property value with the specified nameSet<Annotation>getQualifiers()Returns the set of qualifiers on the eventbooleanisLoopBack()Returns true if the event was sent from the same JVMvoidsetId(InstanceDescriptor id)Set the Intstance DescriptorvoidsetLoopBack(boolean loopBack)Set to true if the event should be sent to listeners in the same JVMvoidsetProperty(String name, String value)Sets a property in the event
-
-
-
Method Detail
-
getId
InstanceDescriptor getId()
Return the Instance Descriptor of the sender- Returns:
-
getInstanceDescriptor
InstanceDescriptor getInstanceDescriptor()
Returns the Instance Descriptor of the Sender- Returns:
-
getPayload
Serializable getPayload() throws IOException, ClassNotFoundException
Returns the Payload of the object. This should be deserialized before being returned- Returns:
- Throws:
IOException- If a problem occurs during DeserializationClassNotFoundException- If a problem occurs during Deserialization
-
getProperties
Properties getProperties()
Returns the set of properties in the event- Returns:
-
getProperty
String getProperty(String name)
Returns the property value with the specified name- Parameters:
name- Name of the property to return- Returns:
-
getProperty
String getProperty(String name, String defaultValue)
Returns the property value with the specified name- Parameters:
name- Name of the property to returndefaultValue- Value to be returned if the property is not present- Returns:
-
isLoopBack
boolean isLoopBack()
Returns true if the event was sent from the same JVM- Returns:
-
setId
void setId(InstanceDescriptor id)
Set the Intstance Descriptor- Parameters:
id-
-
setLoopBack
void setLoopBack(boolean loopBack)
Set to true if the event should be sent to listeners in the same JVM- Parameters:
loopBack-
-
setProperty
void setProperty(String name, String value)
Sets a property in the event- Parameters:
name- Name of the propertyvalue- THe value of the property
-
getQualifiers
Set<Annotation> getQualifiers()
Returns the set of qualifiers on the event- Returns:
-
addQualifiers
void addQualifiers(Set<Annotation> qualifiers) throws IOException
Adds the set of qualifiers to the event- Parameters:
qualifiers-- Throws:
IOException- in case of serialization of qualifiers fails
-
-