Examples of response()


Examples of com.wordnik.swagger.annotations.ApiOperation.response()

  public void execute(RequestMappingContext context) {
    SwaggerGlobalSettings swaggerGlobalSettings = (SwaggerGlobalSettings) context.get("swaggerGlobalSettings");
    HandlerMethod handlerMethod = context.getHandlerMethod();
    ApiOperation methodAnnotation = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), ApiOperation.class);
    ResolvedType returnType;
    if ((null != methodAnnotation) && Void.class != methodAnnotation.response()) {
      log.debug("Overriding response class with annotated response class");
      returnType = swaggerGlobalSettings.getTypeResolver().resolve(methodAnnotation.response());
    } else {
      returnType = handlerReturnType(swaggerGlobalSettings.getTypeResolver(), handlerMethod);
      returnType = swaggerGlobalSettings.getAlternateTypeProvider().alternateFor(returnType);
View Full Code Here

Examples of com.wordnik.swagger.annotations.ApiOperation.response()

    HandlerMethod handlerMethod = context.getHandlerMethod();
    ApiOperation methodAnnotation = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), ApiOperation.class);
    ResolvedType returnType;
    if ((null != methodAnnotation) && Void.class != methodAnnotation.response()) {
      log.debug("Overriding response class with annotated response class");
      returnType = swaggerGlobalSettings.getTypeResolver().resolve(methodAnnotation.response());
    } else {
      returnType = handlerReturnType(swaggerGlobalSettings.getTypeResolver(), handlerMethod);
      returnType = swaggerGlobalSettings.getAlternateTypeProvider().alternateFor(returnType);
    }
    if (Void.class.equals(returnType.getErasedType()) || Void.TYPE.equals(returnType.getErasedType())) {
View Full Code Here

Examples of com.wordnik.swagger.annotations.ApiOperation.response()

            = new HandlerMethodResolver(swaggerGlobalSettings.getTypeResolver());
    ResolvedType modelType = ModelUtils.handlerReturnType(swaggerGlobalSettings.getTypeResolver(), handlerMethod);
    modelType = swaggerGlobalSettings.getAlternateTypeProvider().alternateFor(modelType);

    ApiOperation apiOperationAnnotation = handlerMethod.getMethodAnnotation(ApiOperation.class);
    if (null != apiOperationAnnotation && Void.class != apiOperationAnnotation.response()) {
      modelType = asResolved(swaggerGlobalSettings.getTypeResolver(), apiOperationAnnotation.response());
    }
    if (!swaggerGlobalSettings.getIgnorableParameterTypes().contains(modelType.getErasedType())) {
      ModelContext modelContext = ModelContext.returnValue(modelType);
      markIgnorablesAsHasSeen(swaggerGlobalSettings.getTypeResolver(),
View Full Code Here

Examples of com.wordnik.swagger.annotations.ApiOperation.response()

    ResolvedType modelType = ModelUtils.handlerReturnType(swaggerGlobalSettings.getTypeResolver(), handlerMethod);
    modelType = swaggerGlobalSettings.getAlternateTypeProvider().alternateFor(modelType);

    ApiOperation apiOperationAnnotation = handlerMethod.getMethodAnnotation(ApiOperation.class);
    if (null != apiOperationAnnotation && Void.class != apiOperationAnnotation.response()) {
      modelType = asResolved(swaggerGlobalSettings.getTypeResolver(), apiOperationAnnotation.response());
    }
    if (!swaggerGlobalSettings.getIgnorableParameterTypes().contains(modelType.getErasedType())) {
      ModelContext modelContext = ModelContext.returnValue(modelType);
      markIgnorablesAsHasSeen(swaggerGlobalSettings.getTypeResolver(),
              swaggerGlobalSettings.getIgnorableParameterTypes(),
View Full Code Here

Examples of com.wordnik.swaggersocket.protocol.ResponseMessage.response()

            AtomicInteger expectedResponseCount = (AtomicInteger) getContextValue(res.request(), transactionIdentity.get() + RESPONSE_COUNTER);
            ResponseMessage m = null;
            if (expectedResponseCount != null && res.resource().transport() != AtmosphereResource.TRANSPORT.WEBSOCKET) {
                m = (ResponseMessage) getContextValue(res.request(), transactionIdentity.get() + ResponseMessage.class.getName());
                if (m != null) {
                    m.response(builder.build());
                } else {
                    m = new ResponseMessage(identity, builder.build());
                }

                if (expectedResponseCount.decrementAndGet() <= 0) {
View Full Code Here

Examples of kanakata.analytics.Histogram.response()

            @Override
            public void onAnswerIncorrect(Kana answer) {
                activateTabFor(kana);
                Histogram histogram = selectHistogramFor(kana);
                histogram.registerIncorrectResponse(kana);
                Response response = histogram.response(kana);
                Bin incorrect = incorrectBins.get(kana);
                incorrect.setLevel(response.getIncorrect());
            }

            @Override
View Full Code Here

Examples of kanakata.analytics.Histogram.response()

            @Override
            public void onAnswerCorrect() {
                activateTabFor(kana);
                Histogram histogram = selectHistogramFor(kana);
                histogram.registerCorrectResponse(kana);
                Response response = histogram.response(kana);
                Bin correct = correctBins.get(kana);
                correct.setLevel(response.getCorrect());
            }

            @Override
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.response()

    SimpleChannelInboundHandler<Message> rconInboundHandler = new SimpleChannelInboundHandler<Message>() {
      @Override
      protected void channelRead0(ChannelHandlerContext ctx, Message msg) throws Exception {
        if(msg.command() == Commands.RCON.getNr() && msg.type() == Type.OK) {
          LOG.debug("Successfully set up the reverse connection to peer {}", message.recipient().peerId());
          rconResponse.response(msg);
        } else {
          LOG.debug("Could not acquire a reverse connection to peer {}", message.recipient().peerId());
          rconResponse.failed("Could not acquire a reverse connection");
          futureResponse.failed(rconResponse.failedReason());
        }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.xml.ElementClass.response()

    }

    public static Class<?> getActualJaxbType(Class<?> type, Method resourceMethod, boolean inbound) {
        ElementClass element = resourceMethod.getAnnotation(ElementClass.class);
        if  (element != null) {
            Class<?> cls = inbound ? element.request() : element.response();
            if (cls != Object.class) {
                return cls;
            }
        }
        return type;
View Full Code Here

Examples of org.apache.cxf.jaxrs.model.wadl.ElementClass.response()

    }

    public static Class<?> getActualJaxbType(Class<?> type, Method resourceMethod, boolean inbound) {
        ElementClass element = resourceMethod.getAnnotation(ElementClass.class);
        if  (element != null) {
            Class<?> cls = inbound ? element.request() : element.response();
            if (cls != Object.class) {
                return cls;
            }
        }
        return type;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.