@Description(value="Configuration event with application-specific attachment.") public class Configuration extends Object implements LastingEvent<String>, Serializable
Configuration
event has the following properties:
eventSymbol
- symbol of this event;
version
- version;
attachment
- attachment.
Configuration
.Constructor and Description |
---|
Configuration()
Creates new configuration event with default values.
|
Configuration(String eventSymbol)
Creates new configuration event with the specified event symbol.
|
Configuration(String eventSymbol,
Object attachment)
Creates new configuration event with the specified event symbol and attachment.
|
Configuration(String eventSymbol,
Object attachment,
int version)
Creates new configuration event with the specified event symbol, attachment and version.
|
Modifier and Type | Method and Description |
---|---|
Object |
getAttachment()
Returns attachment.
|
Object |
getAttachment(ClassLoader cl)
Returns attachment.
|
String |
getEventSymbol()
Returns symbol for this event.
|
int |
getVersion()
Returns version.
|
void |
setAttachment(Object attachment)
Changes attachment.
|
void |
setEventSymbol(String eventSymbol)
Changes symbol for this event.
|
void |
setVersion(int version)
Changes version.
|
String |
toString()
Returns string representation of this configuration event.
|
public Configuration()
public Configuration(String eventSymbol)
eventSymbol
- event symbol.public Configuration(String eventSymbol, Object attachment)
eventSymbol
- event symbol.attachment
- attachment.public String getEventSymbol()
getEventSymbol
in interface EventType<String>
public void setEventSymbol(String eventSymbol)
setEventSymbol
in interface EventType<String>
eventSymbol
- event symbol.public int getVersion()
public void setVersion(int version)
version
- version.public Object getAttachment()
RuntimeException
- if object cannot be deserialized from its serial formpublic Object getAttachment(ClassLoader cl)
cl
- the ClassLoader that will be used to load classes; null
for defaultRuntimeException
- if object cannot be deserialized from its serial formpublic void setAttachment(Object attachment)
attachment
- attachment.Copyright © 2015 Devexperts. All Rights Reserved.