/**
* Adds a Decoder class to decode the protocol over this topic.
- *
- * @param groupId of the controller
- * @param artifactId of the controller
- * @param topic the topic
- * @param eventClass the event class
- * @param protocolFilter filters to selectively choose a particular decoder
- * when there are multiples
- *
+ *
+ * @param eventProtocolParams parameter object for event protocol
* @throw IllegalArgumentException if an invalid parameter is passed
*/
- public void addDecoder(String groupId, String artifactId,
- String topic,
- String eventClass,
- JsonProtocolFilter protocolFilter,
- CustomGsonCoder customGsonCoder,
- CustomJacksonCoder customJacksonCoder,
- int modelClassLoaderHash);
+ public void addDecoder(EventProtocolParams eventProtocolParams);
/**
* removes all decoders associated with the controller id.
/**
* Adds a Encoder class to encode the protocol over this topic.
- *
*
- * @param eventProtocolParams@throw IllegalArgumentException if an invalid parameter is passed
+ * @param eventProtocolParams parameter object for event protocol
+ * @throw IllegalArgumentException if an invalid parameter is passed
*/
public void addEncoder(EventProtocolParams eventProtocolParams);
* {@inheritDoc}.
*/
@Override
- public void addDecoder(String groupId, String artifactId, String topic,
- String eventClass,
- JsonProtocolFilter protocolFilter,
- CustomGsonCoder customGsonCoder,
- CustomJacksonCoder customJacksonCoder,
- int modelClassLoaderHash) {
- logger.info("{}: add-decoder {}:{}:{}:{}:{}:{}:{}:{}", this,
- groupId, artifactId, topic, eventClass,
- protocolFilter, customGsonCoder, customJacksonCoder,
- modelClassLoaderHash);
- this.decoders.add(groupId, artifactId, topic, eventClass, protocolFilter,
- customGsonCoder, customJacksonCoder, modelClassLoaderHash);
+ public void addDecoder(EventProtocolParams eventProtocolParams) {
+ logger.info("{}: add-decoder {}:{}:{}:{}:{}:{}:{}:{}", this,
+ eventProtocolParams.getGroupId(),
+ eventProtocolParams.getArtifactId(),
+ eventProtocolParams.getTopic(),
+ eventProtocolParams.getEventClass(),
+ eventProtocolParams.getProtocolFilter(),
+ eventProtocolParams.getCustomGsonCoder(),
+ eventProtocolParams.getCustomJacksonCoder(),
+ eventProtocolParams.getModelClassLoaderHash());
+ this.decoders.add(eventProtocolParams.getGroupId(), eventProtocolParams.getArtifactId(),
+ eventProtocolParams.getTopic(),
+ eventProtocolParams.getEventClass(),
+ eventProtocolParams.getProtocolFilter(),
+ eventProtocolParams.getCustomGsonCoder(),
+ eventProtocolParams.getCustomJacksonCoder(),
+ eventProtocolParams.getModelClassLoaderHash());
}
/**
/**
* produces key for indexing toolset entries.
*
- * @param group group id
+ * @param groupId group id
* @param artifactId artifact id
* @param topic topic
* @return index key