private static void introspectAsyncFeatures(AnnotatedMethod am, ResourceMethod.Builder resourceMethodBuilder) { if (am.isAnnotationPresent(ManagedAsync.class)) { resourceMethodBuilder.managedAsync(); } for (Annotation[] annotations : am.getParameterAnnotations()) { for (Annotation annotation : annotations) { if (annotation.annotationType() == Suspended.class) { resourceMethodBuilder.suspended(AsyncResponse.NO_TIMEOUT, TimeUnit.MILLISECONDS); } } } for (Class<?> paramType : am.getParameterTypes()) { if (SseEventSink.class.equals(paramType)) { resourceMethodBuilder.sse(); } } }
private static void introspectAsyncFeatures(AnnotatedMethod am, ResourceMethod.Builder resourceMethodBuilder) { if (am.isAnnotationPresent(ManagedAsync.class)) { resourceMethodBuilder.managedAsync(); } for (Annotation[] annotations : am.getParameterAnnotations()) { for (Annotation annotation : annotations) { if (annotation.annotationType() == Suspended.class) { resourceMethodBuilder.suspended(AsyncResponse.NO_TIMEOUT, TimeUnit.MILLISECONDS); } } } for (Class<?> paramType : am.getParameterTypes()) { if (SseEventSink.class.equals(paramType)) { resourceMethodBuilder.sse(); } } }
private static void introspectAsyncFeatures(AnnotatedMethod am, ResourceMethod.Builder resourceMethodBuilder) { if (am.isAnnotationPresent(ManagedAsync.class)) { resourceMethodBuilder.managedAsync(); } for (Annotation[] annotations : am.getParameterAnnotations()) { for (Annotation annotation : annotations) { if (annotation.annotationType() == Suspended.class) { resourceMethodBuilder.suspended(AsyncResponse.NO_TIMEOUT, TimeUnit.MILLISECONDS); } } } for (Class<?> paramType : am.getParameterTypes()) { if (SseEventSink.class.equals(paramType)) { resourceMethodBuilder.sse(); } } }
private void createMethod(Resource.Builder resourceBuilder, ResourceMethod template, F3ResourceHandler handler, String[] consumeTypes, String[] produceTypes) { ResourceMethod.Builder methodBuilder = resourceBuilder.addMethod(template.getHttpMethod()); methodBuilder.consumes(template.getConsumedTypes()); methodBuilder.consumes(consumeTypes); methodBuilder.produces(template.getProducedTypes()); methodBuilder.produces(produceTypes); methodBuilder.handledBy(handler, template.getInvocable().getHandlingMethod()); if (template.isSuspendDeclared()) { methodBuilder.suspended(template.getSuspendTimeout(), template.getSuspendTimeoutUnit()); } if (template.isManagedAsyncDeclared()) { methodBuilder.managedAsync(); } }
private void createMethod(Resource.Builder resourceBuilder, ResourceMethod template, F3ResourceHandler handler, String[] consumeTypes, String[] produceTypes) { ResourceMethod.Builder methodBuilder = resourceBuilder.addMethod(template.getHttpMethod()); methodBuilder.consumes(template.getConsumedTypes()); methodBuilder.consumes(consumeTypes); methodBuilder.produces(template.getProducedTypes()); methodBuilder.produces(produceTypes); methodBuilder.handledBy(handler, template.getInvocable().getHandlingMethod()); if (template.isSuspendDeclared()) { methodBuilder.suspended(template.getSuspendTimeout(), template.getSuspendTimeoutUnit()); } if (template.isManagedAsyncDeclared()) { methodBuilder.managedAsync(); } }
private static void introspectAsyncFeatures(AnnotatedMethod am, ResourceMethod.Builder resourceMethodBuilder) { if (am.isAnnotationPresent(ManagedAsync.class)) { resourceMethodBuilder.managedAsync(); } for (Annotation[] annotations : am.getParameterAnnotations()) { for (Annotation annotation : annotations) { if (annotation.annotationType() == Suspended.class) { resourceMethodBuilder.suspended(AsyncResponse.NO_TIMEOUT, TimeUnit.MILLISECONDS); } } } for (Class<?> paramType : am.getParameterTypes()) { if (SseEventSink.class.equals(paramType)) { resourceMethodBuilder.sse(); } } }
private static void introspectAsyncFeatures(AnnotatedMethod am, ResourceMethod.Builder resourceMethodBuilder) { if (am.isAnnotationPresent(ManagedAsync.class)) { resourceMethodBuilder.managedAsync(); } for (Annotation[] annotations : am.getParameterAnnotations()) { for (Annotation annotation : annotations) { if (annotation.annotationType() == Suspended.class) { resourceMethodBuilder.suspended(AsyncResponse.NO_TIMEOUT, TimeUnit.MILLISECONDS); return; } } } }
private static void introspectAsyncFeatures(AnnotatedMethod am, ResourceMethod.Builder resourceMethodBuilder) { if (am.isAnnotationPresent(ManagedAsync.class)) { resourceMethodBuilder.managedAsync(); } for (Annotation[] annotations : am.getParameterAnnotations()) { for (Annotation annotation : annotations) { if (annotation.annotationType() == Suspended.class) { resourceMethodBuilder.suspended(AsyncResponse.NO_TIMEOUT, TimeUnit.MILLISECONDS); return; } } } }
private static void introspectAsyncFeatures(AnnotatedMethod am, ResourceMethod.Builder resourceMethodBuilder) { if (am.isAnnotationPresent(ManagedAsync.class)) { resourceMethodBuilder.managedAsync(); } for (Annotation[] annotations : am.getParameterAnnotations()) { for (Annotation annotation : annotations) { if (annotation.annotationType() == Suspended.class) { resourceMethodBuilder.suspended(AsyncResponse.NO_TIMEOUT, TimeUnit.MILLISECONDS); return; } } } }