We also have to change the target of the @Reference unmarshaller in the
SocketCollector
@Reference(target=Marshaller.SERVICE_KEY_DATAFORMAT + "=my-data-format")
public void setUnmarshaller(Unmarshaller unmarshaller) {
this.unmarshaller = unmarshaller;
}
where my-data-format is a config propertie, may be the reference have to
be set in the activate method.
Le 03/11/2017 à 11:56, Francois Papon a écrit :
> Hi,
>
> I'm back with Decanter :)
>
> I'm thinking about adding a new propertie in the collector-socket to
> define wich marshaller to use.
>
> Actually, the collector-socket marshaller work's only with Json format
> in input but it will be nice if other format could be support.
>
> In the case of network equipement, data is send in different format, and
> most of the time, each constructor send data in proprietary format.
>
> We could made custom dataFormatter implement Marshaller/Unmarshaller
> decanter API packaging in a bundle as the Decanter Marshall Json,
> declare like :
>
> @Component(
> immediate = true,
> property = Marshaller.SERVICE_KEY_DATAFORMAT + "=my-data-format"
> )
>
> in the properties cfg of the collector-socket we could add :
>
> # Dataformat json(default)
> #dataformat=json
>
> dataformat=my-data-format
>
> I'm ready to do it if you think it could be reuse.
>