Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Getting raw packet bytes in a CoapHandler

Hi Eugene,

On 01.08.2017 21:54, Eugene Nikolaev wrote:
> Hello!
> I need to get a raw CoAP packet bytes in a CoapHandler for the per-request logging/audit needs. Standard logging cannot cover a requirement I have to deal with. I see it's not possible to be done using Exchange. Though could I miss something? Is there any known and not-so-bad workaround? I would like to note in advance that MessageInterceptor does not fit as it works on a higher layer there is no any exchange yet.
> 

Cf currently provides no way to "tap in" on the raw messages. However,
you could implement a wrapper around your Endpoint which basically
delegates all method invocations to the Endpoint but registers an
adapter to the RawDataChannel provided in the setRawDataReceiver method
instead of the original RawDataChannel. In this adapter you can then do
your autit logging or whatever you want to do. Be careful though not to
block the thread for too long ...

> Regards, Eugene.
> _______________________________________________
> cf-dev mailing list
> cf-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/cf-dev
> 

Back to the top