public void registerInterceptor(Object interceptor) { boolean registered = false; if (interceptor instanceof ClientExecutionInterceptor) { getExecutionInterceptorList().add( (ClientExecutionInterceptor) interceptor); registered = true; } if (interceptor instanceof MessageBodyReaderInterceptor) { getReaderInterceptorList().add( new ReaderInterceptorRegistry.ReaderInterceptorFacade((MessageBodyReaderInterceptor)interceptor)); registered = true; } if (interceptor instanceof MessageBodyWriterInterceptor) { getWriterInterceptorList().add( new WriterInterceptorRegistry.WriterInterceptorFacade((MessageBodyWriterInterceptor) interceptor)); registered = true; } if (!registered) { throw new RuntimeException(Messages.MESSAGES.entityNotOfUnderstoodType()); } }
public void registerInterceptor(Object interceptor) { boolean registered = false; if (interceptor instanceof ClientExecutionInterceptor) { getExecutionInterceptorList().add( (ClientExecutionInterceptor) interceptor); registered = true; } if (interceptor instanceof MessageBodyReaderInterceptor) { getReaderInterceptorList().add( new ReaderInterceptorRegistry.ReaderInterceptorFacade((MessageBodyReaderInterceptor)interceptor)); registered = true; } if (interceptor instanceof MessageBodyWriterInterceptor) { getWriterInterceptorList().add( new WriterInterceptorRegistry.WriterInterceptorFacade((MessageBodyWriterInterceptor) interceptor)); registered = true; } if (!registered) { throw new RuntimeException(Messages.MESSAGES.entityNotOfUnderstoodType()); } }
@Override public Match postMatch(Class declaring, AccessibleObject target) { Object obj = getLegacyMatch(declaring, target); if (obj == null) return null; MessageBodyReaderInterceptor interceptor = (MessageBodyReaderInterceptor)obj; return new Match(new ReaderInterceptorFacade(interceptor), order); } });
@Override public Match postMatch(Class declaring, AccessibleObject target) { Object obj = getLegacyMatch(declaring, target); if (obj == null) return null; MessageBodyReaderInterceptor interceptor = (MessageBodyReaderInterceptor)obj; return new Match(new ReaderInterceptorFacade(interceptor), order); } });
@Override public Match postMatch(Class declaring, AccessibleObject target) { Object obj = getLegacyMatch(declaring, target); if (obj == null) return null; MessageBodyReaderInterceptor interceptor = (MessageBodyReaderInterceptor)obj; return new Match(new ReaderInterceptorFacade(interceptor), order); }
@Override public Match postMatch(Class declaring, AccessibleObject target) { Object obj = getLegacyMatch(declaring, target); if (obj == null) return null; MessageBodyReaderInterceptor interceptor = (MessageBodyReaderInterceptor)obj; return new Match(new ReaderInterceptorFacade(interceptor), order); }