Java Code Examples for org.apache.flink.runtime.rest.handler.router.Router#addDelete()

The following examples show how to use org.apache.flink.runtime.rest.handler.router.Router#addDelete() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RestServerEndpoint.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
private static void registerHandler(Router router, String handlerURL, HttpMethodWrapper httpMethod, ChannelInboundHandler handler) {
	switch (httpMethod) {
		case GET:
			router.addGet(handlerURL, handler);
			break;
		case POST:
			router.addPost(handlerURL, handler);
			break;
		case DELETE:
			router.addDelete(handlerURL, handler);
			break;
		case PATCH:
			router.addPatch(handlerURL, handler);
			break;
		default:
			throw new RuntimeException("Unsupported http method: " + httpMethod + '.');
	}
}
 
Example 2
Source File: RestServerEndpoint.java    From flink with Apache License 2.0 6 votes vote down vote up
private static void registerHandler(Router router, String handlerURL, HttpMethodWrapper httpMethod, ChannelInboundHandler handler) {
	switch (httpMethod) {
		case GET:
			router.addGet(handlerURL, handler);
			break;
		case POST:
			router.addPost(handlerURL, handler);
			break;
		case DELETE:
			router.addDelete(handlerURL, handler);
			break;
		case PATCH:
			router.addPatch(handlerURL, handler);
			break;
		default:
			throw new RuntimeException("Unsupported http method: " + httpMethod + '.');
	}
}
 
Example 3
Source File: RestServerEndpoint.java    From flink with Apache License 2.0 6 votes vote down vote up
private static void registerHandler(Router router, String handlerURL, HttpMethodWrapper httpMethod, ChannelInboundHandler handler) {
	switch (httpMethod) {
		case GET:
			router.addGet(handlerURL, handler);
			break;
		case POST:
			router.addPost(handlerURL, handler);
			break;
		case DELETE:
			router.addDelete(handlerURL, handler);
			break;
		case PATCH:
			router.addPatch(handlerURL, handler);
			break;
		default:
			throw new RuntimeException("Unsupported http method: " + httpMethod + '.');
	}
}