Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

registering message reader interceptor

Help
2009-09-11
2013-06-06
  • Matthew Young
    Matthew Young
    2009-09-11

    using 1.1 and with the Mock framework i want to register a message reader interceptor....

    have added a media type writer during the setup of the dispatcher and i thought the same thing would work for interceptors.  but the following code doesn't kick start the interceptor:

    InterceptorRegistry<MessageBodyReaderInterceptor> interceptorRegistry = dispatcher
                    .getProviderFactory()
                    .getServerMessageBodyReaderInterceptorRegistry();
    interceptorRegistry.register(new JSONNamespaceMappingInterceptor());

    and printing out the interceptors just gives the GZIPDecodingInterceptor:

    Object[] array = interceptorRegistry.bind(null, null);
    for (Object obj : array)    System.out.println(obj.getClass().getName());

    any ideas?