org.marketcetera.client.instruments
Class InstrumentValidationHandler<I extends Instrument>

java.lang.Object
  extended by org.marketcetera.core.instruments.InstrumentFunctionHandler<I>
      extended by org.marketcetera.client.instruments.InstrumentValidationHandler<I>
Type Parameters:
I - The type of instrument handled by this function
Direct Known Subclasses:
EquityValidationHandler, FutureValidationHandler, OptionValidationHandler

public abstract class InstrumentValidationHandler<I extends Instrument>
extends InstrumentFunctionHandler<I>

A class that abstracts out instrument validation functions.

Since:
2.0.0
Version:
$Id: InstrumentValidationHandler.java 16154 2012-07-14 16:34:05Z colin $
Author:
anshul@marketcetera.com

Field Summary
static StaticInstrumentFunctionSelector<InstrumentValidationHandler> SELECTOR
          The factory that provides the handler instance for the specified instrument.
 
Constructor Summary
protected InstrumentValidationHandler(Class<I> inInstrument)
          Creates an instance that handles the specified instrument subclass.
 
Method Summary
abstract  void validate(Instrument instrument)
          Validates the supplied instrument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTOR

public static final StaticInstrumentFunctionSelector<InstrumentValidationHandler> SELECTOR
The factory that provides the handler instance for the specified instrument.

Constructor Detail

InstrumentValidationHandler

protected InstrumentValidationHandler(Class<I> inInstrument)
Creates an instance that handles the specified instrument subclass.

Parameters:
inInstrument - the instrument subclass handled by this instance.
Method Detail

validate

public abstract void validate(Instrument instrument)
                       throws OrderValidationException
Validates the supplied instrument.

Parameters:
instrument - the instrument
Throws:
OrderValidationException - if the validation fails.


Copyright © 2012. All Rights Reserved.