DefaultHttpClient defaultClient = (DefaultHttpClient) client; defaultClient.setClientIdentifiers(clientId); AnnotationValue<JacksonFeatures> jacksonFeatures = context.findAnnotation(JacksonFeatures.class).orElse(null);
AnnotationValue<Client> clientAnnotation = context.findAnnotation(Client.class).orElseThrow(() -> new IllegalStateException("Client advice called from type that is not annotated with @Client: " + context) ); context.findAnnotation(Version.class) .flatMap(versionAnnotation -> versionAnnotation.getValue(String.class)) .filter(StringUtils::isNotEmpty)
@Override public Object intercept(MethodInvocationContext<Object, Object> context) { Optional<AnnotationValue<Retryable>> opt = context.findAnnotation(Retryable.class); if (!opt.isPresent()) { return context.proceed();
DefaultHttpClient defaultClient = (DefaultHttpClient) client; defaultClient.setClientIdentifiers(clientId); AnnotationValue<JacksonFeatures> jacksonFeatures = context.findAnnotation(JacksonFeatures.class).orElse(null);
DefaultHttpClient defaultClient = (DefaultHttpClient) client; defaultClient.setClientIdentifiers(clientId); AnnotationValue<JacksonFeatures> jacksonFeatures = context.findAnnotation(JacksonFeatures.class).orElse(null);
AnnotationValue<Client> clientAnnotation = context.findAnnotation(Client.class).orElseThrow(() -> new IllegalStateException("Client advice called from type that is not annotated with @Client: " + context) );
AnnotationValue<Client> clientAnnotation = context.findAnnotation(Client.class).orElseThrow(() -> new IllegalStateException("Client advice called from type that is not annotated with @Client: " + context) );