Search in sources :

Example 1 with ConfigRequestProcessor

use of com.linkedin.databus2.core.container.request.ConfigRequestProcessor in project databus by linkedin.

the class HttpRelay method initializeRelayCommandProcessors.

protected void initializeRelayCommandProcessors() throws DatabusException {
    /**
       *  Re-register containerStats to expose DB level aggregate inbound/event stats.
       *  The ContainerStatsRequestProcessor is registered in ServiceContainer. Since,
       *  we are overriding the behavior of ContainerStatsRequestProcessor, we are
       *  re-registering the subclass (RelayContainerStatsRequestProcessor) in place
       *  of ContainerStatsRequestProcessor.
       */
    _processorRegistry.reregister(ContainerStatsRequestProcessor.COMMAND_NAME, new RelayContainerStatsRequestProcessor(null, this));
    _processorRegistry.register(ConfigRequestProcessor.COMMAND_NAME, new ConfigRequestProcessor(null, this));
    _processorRegistry.register(RelayStatsRequestProcessor.COMMAND_NAME, new RelayStatsRequestProcessor(null, this));
    _processorRegistry.register(SourcesRequestProcessor.COMMAND_NAME, new SourcesRequestProcessor(null, this));
    _processorRegistry.register(RegisterRequestProcessor.COMMAND_NAME, new RegisterRequestProcessor(null, this));
    _processorRegistry.register(ReadEventsRequestProcessor.COMMAND_NAME, new ReadEventsRequestProcessor(null, this));
    _processorRegistry.register(PhysicalSourcesRequestProcessor.COMMAND_NAME, new PhysicalSourcesRequestProcessor(null, this));
    _processorRegistry.register(PhysicalBuffersRequestProcessor.COMMAND_NAME, new PhysicalBuffersRequestProcessor(null, this));
    _processorRegistry.register(BufferInfoRequestProcessor.COMMAND_NAME, new BufferInfoRequestProcessor(null, _eventBufferMult));
    _processorRegistry.register(RelayCommandRequestProcessor.COMMAND_NAME, new RelayCommandRequestProcessor(null, this));
}
Also used : PhysicalBuffersRequestProcessor(com.linkedin.databus.container.request.PhysicalBuffersRequestProcessor) PhysicalSourcesRequestProcessor(com.linkedin.databus.container.request.PhysicalSourcesRequestProcessor) SourcesRequestProcessor(com.linkedin.databus.container.request.SourcesRequestProcessor) PhysicalSourcesRequestProcessor(com.linkedin.databus.container.request.PhysicalSourcesRequestProcessor) RelayCommandRequestProcessor(com.linkedin.databus.container.request.RelayCommandRequestProcessor) RelayStatsRequestProcessor(com.linkedin.databus.container.request.RelayStatsRequestProcessor) RegisterRequestProcessor(com.linkedin.databus.container.request.RegisterRequestProcessor) ReadEventsRequestProcessor(com.linkedin.databus.container.request.ReadEventsRequestProcessor) BufferInfoRequestProcessor(com.linkedin.databus.container.request.BufferInfoRequestProcessor) RelayContainerStatsRequestProcessor(com.linkedin.databus.container.request.RelayContainerStatsRequestProcessor) ConfigRequestProcessor(com.linkedin.databus2.core.container.request.ConfigRequestProcessor)

Example 2 with ConfigRequestProcessor

use of com.linkedin.databus2.core.container.request.ConfigRequestProcessor in project databus by linkedin.

the class BootstrapHttpServer method initializeBootstrapServerCommandProcessors.

protected void initializeBootstrapServerCommandProcessors() throws DatabusException {
    LOG.info("Initializing Bootstrap HTTP Server");
    LOG.info("Config=" + _bootstrapServerConfig);
    try {
        RequestProcessorRegistry processorRegistry = getProcessorRegistry();
        processorRegistry.register(ConfigRequestProcessor.COMMAND_NAME, new ConfigRequestProcessor(null, this));
        processorRegistry.register(BootstrapRequestProcessor.COMMAND_NAME, new BootstrapRequestProcessor(null, _bootstrapServerConfig, this));
        processorRegistry.register(StartSCNRequestProcessor.COMMAND_NAME, new StartSCNRequestProcessor(null, _bootstrapServerConfig, this));
        processorRegistry.register(TargetSCNRequestProcessor.COMMAND_NAME, new TargetSCNRequestProcessor(null, _bootstrapServerConfig, this));
        processorRegistry.register(ContainerOperationProcessor.COMMAND_NAME, new ContainerOperationProcessor(null, this));
    } catch (SQLException sqle) {
        throw new DatabusException("command registration failed", sqle);
    } catch (InstantiationException e) {
        throw new DatabusException("command registration failed", e);
    } catch (IllegalAccessException e) {
        throw new DatabusException("command registration failed", e);
    } catch (ClassNotFoundException e) {
        throw new DatabusException("command registration failed", e);
    }
    LOG.info("Done Initializing Bootstrap HTTP Server");
}
Also used : RequestProcessorRegistry(com.linkedin.databus2.core.container.request.RequestProcessorRegistry) DatabusException(com.linkedin.databus2.core.DatabusException) SQLException(java.sql.SQLException) ContainerOperationProcessor(com.linkedin.databus2.core.container.request.ContainerOperationProcessor) ConfigRequestProcessor(com.linkedin.databus2.core.container.request.ConfigRequestProcessor)

Aggregations

ConfigRequestProcessor (com.linkedin.databus2.core.container.request.ConfigRequestProcessor)2 BufferInfoRequestProcessor (com.linkedin.databus.container.request.BufferInfoRequestProcessor)1 PhysicalBuffersRequestProcessor (com.linkedin.databus.container.request.PhysicalBuffersRequestProcessor)1 PhysicalSourcesRequestProcessor (com.linkedin.databus.container.request.PhysicalSourcesRequestProcessor)1 ReadEventsRequestProcessor (com.linkedin.databus.container.request.ReadEventsRequestProcessor)1 RegisterRequestProcessor (com.linkedin.databus.container.request.RegisterRequestProcessor)1 RelayCommandRequestProcessor (com.linkedin.databus.container.request.RelayCommandRequestProcessor)1 RelayContainerStatsRequestProcessor (com.linkedin.databus.container.request.RelayContainerStatsRequestProcessor)1 RelayStatsRequestProcessor (com.linkedin.databus.container.request.RelayStatsRequestProcessor)1 SourcesRequestProcessor (com.linkedin.databus.container.request.SourcesRequestProcessor)1 DatabusException (com.linkedin.databus2.core.DatabusException)1 ContainerOperationProcessor (com.linkedin.databus2.core.container.request.ContainerOperationProcessor)1 RequestProcessorRegistry (com.linkedin.databus2.core.container.request.RequestProcessorRegistry)1 SQLException (java.sql.SQLException)1