Package com.hazelcast.config
Class ListenerConfig
java.lang.Object
com.hazelcast.config.ListenerConfig
- All Implemented Interfaces:
- DataSerializable,- IdentifiedDataSerializable
- Direct Known Subclasses:
- CachePartitionLostListenerConfig,- EntryListenerConfig,- ItemListenerConfig,- MapPartitionLostListenerConfig,- SplitBrainProtectionListenerConfig
Contains the configuration for an 
EventListener. The configuration
 contains either the classname of the EventListener implementation, or the
 actual EventListener instance.- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a ListenerConfig without className/implementation.ListenerConfig(ListenerConfig config) ListenerConfig(String className) Creates a ListenerConfig with the given className.ListenerConfig(EventListener implementation) Creates a ListenerConfig with the given implementation.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanintReturns type identifier for this class.Returns the name of the class of the EventListener.intReturns DataSerializableFactory factory ID for this class.Returns the EventListener implementation.inthashCode()booleanbooleanisLocal()voidReads fields from the input streamsetClassName(String className) Sets the class name of the EventListener.setImplementation(EventListener implementation) Sets the EventListener implementation.toString()voidWrites object fields to output stream
- 
Field Details- 
className
- 
implementation
 
- 
- 
Constructor Details- 
ListenerConfigpublic ListenerConfig()Creates a ListenerConfig without className/implementation.
- 
ListenerConfigCreates a ListenerConfig with the given className.- Parameters:
- className- the name of the EventListener class
- Throws:
- IllegalArgumentException- if className is- nullor an empty String
 
- 
ListenerConfigCreates a ListenerConfig with the given implementation.- Parameters:
- implementation- the implementation to use as EventListener
- Throws:
- IllegalArgumentException- if the implementation is- null
 
- 
ListenerConfig
 
- 
- 
Method Details- 
getClassNameReturns the name of the class of the EventListener. If no class is specified, null is returned.- Returns:
- the class name of the EventListener
- See Also:
 
- 
setClassNameSets the class name of the EventListener.If a implementation was set, it will be removed. - Parameters:
- className- the name of the class of the EventListener
- Returns:
- the updated ListenerConfig
- Throws:
- IllegalArgumentException- if className is- nullor an empty String
- See Also:
 
- 
getImplementationReturns the EventListener implementation. If none has been specified, null is returned.- Returns:
- the EventListener implementation
- See Also:
 
- 
setImplementationSets the EventListener implementation.If a className was set, it will be removed. - Parameters:
- implementation- the EventListener implementation
- Returns:
- the updated ListenerConfig
- Throws:
- IllegalArgumentException- the implementation is- null
- See Also:
 
- 
isIncludeValuepublic boolean isIncludeValue()
- 
isLocalpublic boolean isLocal()
- 
toString
- 
getFactoryIdpublic int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
- getFactoryIdin interface- IdentifiedDataSerializable
- Returns:
- factory ID
 
- 
getClassIdpublic int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
- getClassIdin interface- IdentifiedDataSerializable
- Returns:
- type ID
 
- 
writeDataDescription copied from interface:DataSerializableWrites object fields to output stream- Specified by:
- writeDatain interface- DataSerializable
- Parameters:
- out- output
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the output stream has been closed.
 
- 
readDataDescription copied from interface:DataSerializableReads fields from the input stream- Specified by:
- readDatain interface- DataSerializable
- Parameters:
- in- input
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the input stream has been closed.
 
- 
equals
- 
hashCodepublic int hashCode()
 
-