Package com.apama.iaf.plugin
Interface ConfigurableCodec
- 
 public interface ConfigurableCodecThis interface defines functions that Codecs which have upstream events passed to them via their associated transport must perform. Codecs which are used with the FileAdapter, which receives events via the Null codec upstream are such codecs.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringDATA_FIELDstatic java.lang.StringSESSION_ID_FIELD
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddConfiguration(int sessionId, NormalisedEvent configuration)A codec may wish to support multiple configurations depending on data being read.booleanperformsEscapingDownstream()Whether or not the codec performs escaping downstream.voidremoveConfiguration(int sessionId)Remove configuration associated with the given id
 
- 
- 
- 
Field Detail- 
DATA_FIELDstatic final java.lang.String DATA_FIELD - See Also:
- Constant Field Values
 
 - 
SESSION_ID_FIELDstatic final java.lang.String SESSION_ID_FIELD - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
addConfigurationvoid addConfiguration(int sessionId, NormalisedEvent configuration) throws java.io.IOExceptionA codec may wish to support multiple configurations depending on data being read. The codec does not have to do anything in this function if it has no need for specific information relating to a particular data sink being used. The motivation for this functionality was the Apama File adapter. Multiple configurations may be needed if there are multiple files being read using (for instance) different separators delimiting fields.- Parameters:
- sessionId- the sessionID this data relates to. Important as the codec may have configuration information based on the sessionID
- configuration- The normalised event containing the additional information required
- Throws:
- java.io.IOException- if the configuration could not be added to the codec
 
 - 
removeConfigurationvoid removeConfiguration(int sessionId) throws java.io.IOExceptionRemove configuration associated with the given id- Parameters:
- sessionId- the sessionId to remove the configuration for
- Throws:
- java.io.IOException
 
 - 
performsEscapingDownstreamboolean performsEscapingDownstream() Whether or not the codec performs escaping downstream. Dependant on what encoding the codec needs to perform, it may prefer to do add escape characters where necessary to strings itself. If this returns true, the transport won't escape the line before it sends it to the codec.- Returns:
- whether or not the codec performs it's own escaping when sending downstream messages
 
 
- 
 
-