public class ListenerConfig extends Object implements IdentifiedDataSerializable
EventListener
. The configuration contains either the classname
of the EventListener implementation, or the actual EventListener instance.Modifier and Type | Field and Description |
---|---|
protected String |
className |
protected EventListener |
implementation |
Constructor and Description |
---|
ListenerConfig()
Creates a ListenerConfig without className/implementation.
|
ListenerConfig(EventListener implementation)
Creates a ListenerConfig with the given implementation.
|
ListenerConfig(ListenerConfig config) |
ListenerConfig(String className)
Creates a ListenerConfig with the given className.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ListenerConfig |
getAsReadOnly()
Deprecated.
this method will be removed in 4.0; it is meant for internal usage only
|
String |
getClassName()
Returns the name of the class of the EventListener.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
EventListener |
getImplementation()
Returns the EventListener implementation.
|
int |
hashCode() |
boolean |
isIncludeValue() |
boolean |
isLocal() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
ListenerConfig |
setClassName(String className)
Sets the class name of the EventListener.
|
ListenerConfig |
setImplementation(EventListener implementation)
Sets the EventListener implementation.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
protected String className
protected EventListener implementation
public ListenerConfig()
public ListenerConfig(String className)
className
- the name of the EventListener classIllegalArgumentException
- if className is null
or an empty Stringpublic ListenerConfig(ListenerConfig config)
public ListenerConfig(EventListener implementation)
implementation
- the implementation to use as EventListenerIllegalArgumentException
- if the implementation is null
public ListenerConfig getAsReadOnly()
public String getClassName()
setClassName(String)
public ListenerConfig setClassName(String className)
If a implementation was set, it will be removed.
className
- the name of the class of the EventListenerIllegalArgumentException
- if className is null
or an empty StringsetImplementation(java.util.EventListener)
,
getClassName()
public EventListener getImplementation()
setImplementation(java.util.EventListener)
public ListenerConfig setImplementation(EventListener implementation)
If a className was set, it will be removed.
implementation
- the EventListener implementationIllegalArgumentException
- the implementation is null
setClassName(String)
,
getImplementation()
public boolean isIncludeValue()
public boolean isLocal()
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2018 Hazelcast, Inc.. All rights reserved.