Package io.quarkus.amazon.lambda.runtime
Class MockEventServer
- java.lang.Object
-
- io.quarkus.amazon.lambda.runtime.MockEventServer
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MockEventServer extends Object implements Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static StringBASE_PATHprotected ExecutorServiceblockingPool(package private) AtomicBooleanclosedstatic StringCONTINUEstatic intDEFAULT_PORTprotected io.vertx.core.http.HttpServerhttpServerstatic StringINVOCATIONprotected static org.jboss.logging.Loggerlogstatic StringNEXT_INVOCATIONstatic StringPOST_EVENTprotected BlockingQueue<io.vertx.ext.web.RoutingContext>queueprotected ConcurrentHashMap<String,io.vertx.ext.web.RoutingContext>responsePendingprotected io.vertx.ext.web.Routerrouter
-
Constructor Summary
Constructors Constructor Description MockEventServer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancanHaveCommaValue(String header)voidclose()protected voiddefaultHandlerSetup()protected StringgetEventContentType(io.vertx.ext.web.RoutingContext request)intgetPort()voidhandleError(io.vertx.ext.web.RoutingContext ctx)voidhandleRequeue(io.vertx.ext.web.RoutingContext ctx)voidhandleResponse(io.vertx.ext.web.RoutingContext ctx)voidnextEvent(io.vertx.ext.web.RoutingContext ctx)voidpostEvent(io.vertx.ext.web.RoutingContext ctx)voidprocessError(io.vertx.ext.web.RoutingContext ctx, io.vertx.ext.web.RoutingContext pending, io.vertx.core.buffer.Buffer buffer)protected io.vertx.core.buffer.BufferprocessEventBody(io.vertx.ext.web.RoutingContext request)voidprocessResponse(io.vertx.ext.web.RoutingContext ctx, io.vertx.ext.web.RoutingContext pending, io.vertx.core.buffer.Buffer buffer)voidsetupRoutes()voidstart()voidstart(int port)
-
-
-
Field Detail
-
log
protected static final org.jboss.logging.Logger log
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
httpServer
protected io.vertx.core.http.HttpServer httpServer
-
router
protected io.vertx.ext.web.Router router
-
queue
protected BlockingQueue<io.vertx.ext.web.RoutingContext> queue
-
responsePending
protected ConcurrentHashMap<String,io.vertx.ext.web.RoutingContext> responsePending
-
blockingPool
protected ExecutorService blockingPool
-
BASE_PATH
public static final String BASE_PATH
- See Also:
- Constant Field Values
-
INVOCATION
public static final String INVOCATION
- See Also:
- Constant Field Values
-
NEXT_INVOCATION
public static final String NEXT_INVOCATION
- See Also:
- Constant Field Values
-
POST_EVENT
public static final String POST_EVENT
- See Also:
- Constant Field Values
-
CONTINUE
public static final String CONTINUE
- See Also:
- Constant Field Values
-
closed
final AtomicBoolean closed
-
-
Method Detail
-
canHaveCommaValue
public static boolean canHaveCommaValue(String header)
-
start
public void start()
-
start
public void start(int port)
-
getPort
public int getPort()
-
setupRoutes
public void setupRoutes()
-
defaultHandlerSetup
protected void defaultHandlerSetup()
-
postEvent
public void postEvent(io.vertx.ext.web.RoutingContext ctx)
-
nextEvent
public void nextEvent(io.vertx.ext.web.RoutingContext ctx)
-
getEventContentType
protected String getEventContentType(io.vertx.ext.web.RoutingContext request)
-
processEventBody
protected io.vertx.core.buffer.Buffer processEventBody(io.vertx.ext.web.RoutingContext request)
-
handleResponse
public void handleResponse(io.vertx.ext.web.RoutingContext ctx)
-
handleRequeue
public void handleRequeue(io.vertx.ext.web.RoutingContext ctx)
-
processResponse
public void processResponse(io.vertx.ext.web.RoutingContext ctx, io.vertx.ext.web.RoutingContext pending, io.vertx.core.buffer.Buffer buffer)
-
handleError
public void handleError(io.vertx.ext.web.RoutingContext ctx)
-
processError
public void processError(io.vertx.ext.web.RoutingContext ctx, io.vertx.ext.web.RoutingContext pending, io.vertx.core.buffer.Buffer buffer)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-