org.apache.flink.runtime.rest.handler.AbstractRestHandler Java Examples

The following examples show how to use org.apache.flink.runtime.rest.handler.AbstractRestHandler. 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: TestRestServerEndpoint.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
protected List<Tuple2<RestHandlerSpecification, ChannelInboundHandler>> initializeHandlers(final CompletableFuture<String> localAddressFuture) {
	final List<Tuple2<RestHandlerSpecification, ChannelInboundHandler>> handlers = new ArrayList<>(abstractRestHandlers.length);
	for (final AbstractRestHandler abstractRestHandler : abstractRestHandlers) {
		handlers.add(Tuple2.of(
			abstractRestHandler.getMessageHeaders(),
			abstractRestHandler));
	}
	return handlers;
}
 
Example #2
Source File: TestRestServerEndpoint.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
static TestRestServerEndpoint createAndStartRestServerEndpoint(
		final RestServerEndpointConfiguration restServerEndpointConfiguration,
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws Exception {
	final TestRestServerEndpoint testRestServerEndpoint = new TestRestServerEndpoint(restServerEndpointConfiguration, abstractRestHandlers);
	testRestServerEndpoint.start();
	return testRestServerEndpoint;
}
 
Example #3
Source File: TestRestServerEndpoint.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected List<Tuple2<RestHandlerSpecification, ChannelInboundHandler>> initializeHandlers(final CompletableFuture<String> localAddressFuture) {
	final List<Tuple2<RestHandlerSpecification, ChannelInboundHandler>> handlers = new ArrayList<>(abstractRestHandlers.length);
	for (final AbstractRestHandler abstractRestHandler : abstractRestHandlers) {
		handlers.add(Tuple2.of(
			abstractRestHandler.getMessageHeaders(),
			abstractRestHandler));
	}
	return handlers;
}
 
Example #4
Source File: TestRestServerEndpoint.java    From flink with Apache License 2.0 5 votes vote down vote up
static TestRestServerEndpoint createAndStartRestServerEndpoint(
		final RestServerEndpointConfiguration restServerEndpointConfiguration,
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws Exception {
	final TestRestServerEndpoint testRestServerEndpoint = new TestRestServerEndpoint(restServerEndpointConfiguration, abstractRestHandlers);
	testRestServerEndpoint.start();
	return testRestServerEndpoint;
}
 
Example #5
Source File: TestRestServerEndpoint.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected List<Tuple2<RestHandlerSpecification, ChannelInboundHandler>> initializeHandlers(final CompletableFuture<String> localAddressFuture) {
	final List<Tuple2<RestHandlerSpecification, ChannelInboundHandler>> handlers = new ArrayList<>(abstractRestHandlers.length);
	for (final AbstractRestHandler abstractRestHandler : abstractRestHandlers) {
		handlers.add(Tuple2.of(
			abstractRestHandler.getMessageHeaders(),
			abstractRestHandler));
	}
	return handlers;
}
 
Example #6
Source File: TestRestServerEndpoint.java    From flink with Apache License 2.0 5 votes vote down vote up
static TestRestServerEndpoint createAndStartRestServerEndpoint(
		final RestServerEndpointConfiguration restServerEndpointConfiguration,
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws Exception {
	final TestRestServerEndpoint testRestServerEndpoint = new TestRestServerEndpoint(restServerEndpointConfiguration, abstractRestHandlers);
	testRestServerEndpoint.start();
	return testRestServerEndpoint;
}
 
Example #7
Source File: TestRestServerEndpoint.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
TestRestServerEndpoint(
		final RestServerEndpointConfiguration configuration,
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws IOException {
	super(configuration);
	this.abstractRestHandlers = abstractRestHandlers;
}
 
Example #8
Source File: RestClusterClientTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
private TestRestServerEndpoint createRestServerEndpoint(
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws Exception {
	return TestRestServerEndpoint.createAndStartRestServerEndpoint(restServerEndpointConfiguration, abstractRestHandlers);
}
 
Example #9
Source File: TestRestServerEndpoint.java    From flink with Apache License 2.0 4 votes vote down vote up
TestRestServerEndpoint(
		final RestServerEndpointConfiguration configuration,
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws IOException {
	super(configuration);
	this.abstractRestHandlers = abstractRestHandlers;
}
 
Example #10
Source File: RestClusterClientTest.java    From flink with Apache License 2.0 4 votes vote down vote up
private TestRestServerEndpoint createRestServerEndpoint(
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws Exception {
	return TestRestServerEndpoint.createAndStartRestServerEndpoint(restServerEndpointConfiguration, abstractRestHandlers);
}
 
Example #11
Source File: TestRestServerEndpoint.java    From flink with Apache License 2.0 4 votes vote down vote up
TestRestServerEndpoint(
		final RestServerEndpointConfiguration configuration,
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws IOException {
	super(configuration);
	this.abstractRestHandlers = abstractRestHandlers;
}
 
Example #12
Source File: RestClusterClientTest.java    From flink with Apache License 2.0 4 votes vote down vote up
private TestRestServerEndpoint createRestServerEndpoint(
		final AbstractRestHandler<?, ?, ?, ?>... abstractRestHandlers) throws Exception {
	return TestRestServerEndpoint.createAndStartRestServerEndpoint(restServerEndpointConfiguration, abstractRestHandlers);
}