com.dxfeed.event.misc
Class Configuration

java.lang.Object
  extended by com.dxfeed.event.misc.Configuration
All Implemented Interfaces:
LastingEvent, Serializable

@EventType
public final class Configuration
extends Object
implements LastingEvent, Serializable

Configuration event with application-specific attachment.

See Also:
Serialized Form

Constructor Summary
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.
 
Method Summary
 Object getAttachment()
          Returns attachment.
 Object getAttachment(ClassLoader cl)
          Returns attachment.
 String getEventSymbol()
          Returns symbol for this event.
 Object getMarshalledAttachment()
          Returns implementation-specific form of an attachment.
 int getVersion()
          Returns version.
 void setAttachment(Object attachment)
          Changes attachment.
 void setEventSymbol(String eventSymbol)
          Changes symbol for this event.
 void setMarshalledAttachment(Object attachment)
          Changes implementation-specific form of an attachment.
 void setVersion(int version)
          Changes version.
 String toString()
          Returns string representation of this configuration event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Creates new configuration event with default values.


Configuration

public Configuration(String eventSymbol)
Creates new configuration event with the specified event symbol.

Parameters:
eventSymbol - event symbol.

Configuration

public Configuration(String eventSymbol,
                     Object attachment)
Creates new configuration event with the specified event symbol and attachment.

Parameters:
eventSymbol - event symbol.
attachment - attachment.

Configuration

public Configuration(String eventSymbol,
                     Object attachment,
                     int version)
Creates new configuration event with the specified event symbol, attachment and version.

Parameters:
eventSymbol - event symbol.
attachment - attachment.
version - version.
Method Detail

getEventSymbol

public String getEventSymbol()
Returns symbol for this event.


setEventSymbol

public void setEventSymbol(String eventSymbol)
Changes symbol for this event.

Parameters:
eventSymbol - event symbol.

getVersion

public int getVersion()
Returns version.


setVersion

public void setVersion(int version)
Changes version.

Parameters:
version - version.

getAttachment

public Object getAttachment()
Returns attachment.

Throws:
RuntimeException - if object cannot be deserialized from its serial form

getAttachment

public Object getAttachment(ClassLoader cl)
Returns attachment.

Parameters:
cl - the ClassLoader that will be used to load classes; null for default
Throws:
RuntimeException - if object cannot be deserialized from its serial form

setAttachment

public void setAttachment(Object attachment)
Changes attachment.

Parameters:
attachment - attachment.

getMarshalledAttachment

public Object getMarshalledAttachment()
Returns implementation-specific form of an attachment. Do not use this method directly. It may be removed or changed in the future versions.


setMarshalledAttachment

public void setMarshalledAttachment(Object attachment)
Changes implementation-specific form of an attachment. Do not use this method directly. It may be removed or changed in the future versions.

Parameters:
attachment - implementation-specific form of an attachment.

toString

public String toString()
Returns string representation of this configuration event.

Overrides:
toString in class Object


Copyright © 2013 Devexperts. All Rights Reserved.