Java 类com.amazonaws.services.lambda.runtime.RequestStreamHandler 实例源码

项目:lambda-local    文件:LambdaFunctionAnnotationScanner.java   
private LambdaRequestDeserializer createDeserializer(Class<?> handlerClass,
                                                     @Nullable Class<? extends LambdaRequestDeserializer<?>> cls) {
    if (cls == null) {
        if (RequestStreamHandler.class.isAssignableFrom(handlerClass)) {
            return new LambdaProxyRequestStreamDeserializer();
        } else {
            return new LambdaProxyRequestDeserializer();
        }
    }
    try {
        return cls.newInstance();
    } catch (InstantiationException | IllegalAccessException e) {
        throw new IllegalArgumentException("Unable to create:" + cls, e);
    }
}
项目:lambda-local    文件:LambdaFunctionAnnotationScanner.java   
private LambdaResponseSerializer createSerializer(Class<?> handlerClass,
                                                  @Nullable Class<? extends LambdaResponseSerializer<?>> cls) {
    if (cls == null) {
        if (RequestStreamHandler.class.isAssignableFrom(handlerClass)) {
            return new LambdaProxyResponseStreamSerializer();
        } else {
            return new LambdaProxyResponseSerializer();
        }
    }
    try {
        return cls.newInstance();
    } catch (InstantiationException | IllegalAccessException e) {
        throw new IllegalArgumentException("Unable to create:" + cls, e);
    }
}
项目:spring-aws-lambda    文件:SpringRequestStreamHandler.java   
public SpringRequestStreamHandler() {
    this.handler = getApplicationContext().getBean(RequestStreamHandler.class);
}