com.devexperts.qd.qtp
Class MessageAdapter.AbstractFactory

java.lang.Object
  extended by com.devexperts.qd.qtp.MessageAdapter.AbstractFactory
All Implemented Interfaces:
ConfigurableMessageAdapterFactory, MessageAdapter.Factory, java.lang.Cloneable
Direct Known Subclasses:
AgentAdapter.Factory, DistributorAdapter.Factory
Enclosing class:
MessageAdapter

public abstract static class MessageAdapter.AbstractFactory
extends java.lang.Object
implements java.lang.Cloneable, MessageAdapter.Factory, ConfigurableMessageAdapterFactory

An abstract message adapter factory.


Field Summary
protected  SubscriptionFilter filter
           
protected  SubscriptionFilterFactory filterFactory
           
protected  QDHistory history
           
protected  QDStream stream
           
protected  QDTicker ticker
           
 
Constructor Summary
protected MessageAdapter.AbstractFactory(QDTicker ticker, QDStream stream, QDHistory history, SubscriptionFilter filter)
          Creates new factory.
 
Method Summary
 MessageAdapter.Factory createMessageAdapterFactory(java.lang.String spec)
          This implementation uses Object.clone() and replaces filter using default SubscriptionFilterFactory or PatternFilter and using old filter as a chained filter for it.
 java.lang.String toString()
          Returns description of this MessageAdapter.Factory for management and logging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.devexperts.qd.qtp.MessageAdapter.Factory
createAdapter
 

Field Detail

ticker

protected final QDTicker ticker

stream

protected final QDStream stream

history

protected final QDHistory history

filterFactory

protected final SubscriptionFilterFactory filterFactory

filter

protected SubscriptionFilter filter
Constructor Detail

MessageAdapter.AbstractFactory

protected MessageAdapter.AbstractFactory(QDTicker ticker,
                                         QDStream stream,
                                         QDHistory history,
                                         SubscriptionFilter filter)
Creates new factory. Accepts null parameters.

Parameters:
ticker - QDTicker to use.
stream - QDStream to use.
history - QDHistory to use.
filter - SubscriptionFilter to use.
Method Detail

createMessageAdapterFactory

public MessageAdapter.Factory createMessageAdapterFactory(java.lang.String spec)
                                                   throws AddressSyntaxException
This implementation uses Object.clone() and replaces filter using default SubscriptionFilterFactory or PatternFilter and using old filter as a chained filter for it.

Specified by:
createMessageAdapterFactory in interface ConfigurableMessageAdapterFactory
Throws:
AddressSyntaxException - if spec is illegal or not supported.

toString

public java.lang.String toString()
Returns description of this MessageAdapter.Factory for management and logging purposes.

Overrides:
toString in class java.lang.Object