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 void
addQualifiers(Set<Annotation> qualifiers)
Adds the set of qualifiers to the eventInstanceDescriptor
getId()
Return the Instance Descriptor of the senderInstanceDescriptor
getInstanceDescriptor()
Returns the Instance Descriptor of the SenderSerializable
getPayload()
Returns the Payload of the object.Properties
getProperties()
Returns the set of properties in the eventString
getProperty(String name)
Returns the property value with the specified nameString
getProperty(String name, String defaultValue)
Returns the property value with the specified nameSet<Annotation>
getQualifiers()
Returns the set of qualifiers on the eventboolean
isLoopBack()
Returns true if the event was sent from the same JVMvoid
setId(InstanceDescriptor id)
Set the Intstance Descriptorvoid
setLoopBack(boolean loopBack)
Set to true if the event should be sent to listeners in the same JVMvoid
setProperty(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
-
-