当前位置: 首页>>代码示例>>Java>>正文


Java Configuration类代码示例

本文整理汇总了Java中org.graylog2.plugin.configuration.Configuration的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Configuration类属于org.graylog2.plugin.configuration包,在下文中一共展示了Configuration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SFlowInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Inject
public SFlowInput(@Assisted Configuration configuration,
                  UdpTransport.Factory transportFactory,
                  SFlowCodec.Factory codecFactory,
                  Config config,
                  Descriptor descriptor,
                  MetricRegistry metricRegistry,
                  LocalMetricRegistry localRegistry,
                  ServerStatus serverStatus)
{
    super(metricRegistry,
          configuration,
          transportFactory.create(configuration),
          localRegistry,
          codecFactory.create(configuration),
          config,
          descriptor,
          serverStatus);
}
 
开发者ID:tom-saunders,项目名称:graylog-plugin-sflow-input,代码行数:20,代码来源:SFlowInput.java

示例2: SerializedLogEventCodec

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Inject
public SerializedLogEventCodec(@Assisted Configuration configuration,
                               NodeId nodeId,
                               NodeService nodeService,
                               ClusterConfigService clusterConfigService) {
    super(configuration);
    this.includeSource = configuration.getBoolean(CK_INCLUDE_SOURCE, true);
    this.includeThreadContext = configuration.getBoolean(CK_INCLUDE_THREAD_CONTEXT, true);
    this.includeStackTrace = configuration.getBoolean(CK_INCLUDE_STACK_TRACE, true);
    this.includeExceptionCause = configuration.getBoolean(CK_INCLUDE_EXCEPTION_CAUSE, true);

    final ClusterId clusterIdBean = clusterConfigService.get(ClusterId.class);
    this.clusterId = clusterIdBean == null ? null : clusterIdBean.clusterId();

    this.nodeId = nodeId.toString();
    String nodeHostname;
    try {
        final Node node = nodeService.byNodeId(nodeId);
        nodeHostname = node.getHostname();
    } catch (NodeNotFoundException e) {
        nodeHostname = null;
    }
    this.hostname = nodeHostname;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-internal-logs,代码行数:25,代码来源:SerializedLogEventCodec.java

示例3: S3Input

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@AssistedInject
public S3Input(@Assisted Configuration configuration,
               MetricRegistry metricRegistry,
               S3Transport.Factory transport,
               LocalMetricRegistry localRegistry,
               S3Codec.Factory codec,
               Config config,
               Descriptor descriptor,
               ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            transport.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus);
}
 
开发者ID:sherzberg,项目名称:graylog-plugin-s3,代码行数:20,代码来源:S3Input.java

示例4: setUp

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Before
public void setUp() throws MessageOutputConfigurationException {
    final Configuration configuration = new Configuration(
            ImmutableMap.of(
                    "redis_uri", "redis://" + REDIS_HOST + ":" + REDIS_PORT,
                    "redis_channel", "graylog"
            )

    );
    when(serverStatus.getClusterId()).thenReturn(CLUSTER_ID);
    when(nodeId.toString()).thenReturn(NODE_ID);
    when(serverStatus.getNodeId()).thenReturn(nodeId);

    output = new GELFRedisOutput(configuration, serverStatus);

    assumeTrue(output.isRunning());
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-redis,代码行数:18,代码来源:GELFRedisOutputIT.java

示例5: CEFCodec

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@AssistedInject
public CEFCodec(@Assisted Configuration configuration) {
    this.configuration = configuration;
    this.parser = CEFParserFactory.create();

    DateTimeZone timezone;
    try {
        timezone = DateTimeZone.forID(configuration.getString(CK_TIMEZONE));
    } catch (Exception e) {
        LOG.warn("Could not configure CEF input timezone. Falling back to local default. Please check the error message:", e);
        timezone = DateTimeZone.getDefault();
    }
    this.timezone = timezone;
    this.locale = Locale.forLanguageTag(configuration.getString(CK_LOCALE, ""));

    this.useFullNames = configuration.getBoolean(CK_USE_FULL_NAMES);
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-cef,代码行数:18,代码来源:CEFCodec.java

示例6: CEFUDPInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@AssistedInject
public CEFUDPInput(@Assisted Configuration configuration,
                    MetricRegistry metricRegistry,
                    final UdpTransport.Factory udpTransportFactory,
                    final LocalMetricRegistry localRegistry,
                    CEFCodec.Factory codec,
                    Config config,
                    Descriptor descriptor,
                    ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            udpTransportFactory.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus
    );
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-cef,代码行数:21,代码来源:CEFUDPInput.java

示例7: CEFTCPInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@AssistedInject
public CEFTCPInput(@Assisted Configuration configuration,
                   MetricRegistry metricRegistry,
                   final TcpTransport.Factory tcpTransportFactory,
                   final LocalMetricRegistry localRegistry,
                   CEFCodec.Factory codec,
                   Config config,
                   Descriptor descriptor,
                   ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            tcpTransportFactory.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus
    );
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-cef,代码行数:21,代码来源:CEFTCPInput.java

示例8: CEFKafkaInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@AssistedInject
public CEFKafkaInput(@Assisted Configuration configuration,
                     MetricRegistry metricRegistry,
                     final KafkaTransport.Factory kafkaTransportFactory,
                     final LocalMetricRegistry localRegistry,
                     CEFCodec.Factory codec,
                     Config config,
                     Descriptor descriptor,
                     ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            kafkaTransportFactory.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus
    );
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-cef,代码行数:21,代码来源:CEFKafkaInput.java

示例9: CEFAmqpInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@AssistedInject
public CEFAmqpInput(@Assisted Configuration configuration,
                    MetricRegistry metricRegistry,
                    final AmqpTransport.Factory amqpTransportFactory,
                    final LocalMetricRegistry localRegistry,
                    CEFCodec.Factory codec,
                    Config config,
                    Descriptor descriptor,
                    ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            amqpTransportFactory.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus
    );
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-cef,代码行数:21,代码来源:CEFAmqpInput.java

示例10: GraylogPluginDatadog

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Inject
public GraylogPluginDatadog(@Assisted Stream stream, @Assisted Configuration configuration) throws MessageOutputConfigurationException {
    this.configuration = configuration;

    tags = configuration.getString(CK_DATADOG_TAGS, "").split(",");
    priority = configuration.getString(CK_DATADOG_PRIORITY, "normal");
    alertType = configuration.getString(CK_DATADOG_ALERT_TYPE, "info");
    aggregationKey = configuration.getString(CK_DATADOG_AGGREGATION_KEY, "");

    try {
        eventUrl = new URI(String.format("%s?api_key=%s&app_key=%s",
                                         DATADOG_API_URL,
                                         configuration.getString(CK_DATADOG_API_KEY),
                                         configuration.getString(CK_DATADOG_APP_KEY)));
    } catch (URISyntaxException e){
        throw new MessageOutputConfigurationException("Syntax error in datadog event URL");
    }

    Client client = ClientBuilder.newClient();
    eventTarget = client.target(eventUrl);
    isRunning.set(true);
}
 
开发者ID:underdogio,项目名称:graylog-plugin-datadog,代码行数:23,代码来源:GraylogPluginDatadog.java

示例11: setUp

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Before
public void setUp() {
    final NettyTransportConfiguration nettyTransportConfiguration = new NettyTransportConfiguration("nio", "jdk", 1);
    eventLoopGroupFactory = new EventLoopGroupFactory(nettyTransportConfiguration);
    eventLoopGroup = new NioEventLoopGroup(1);
    transport = new NetFlowUdpTransport(
            Configuration.EMPTY_CONFIGURATION,
            eventLoopGroupFactory,
            nettyTransportConfiguration,
            new ThroughputCounter(eventLoopGroup),
            new LocalMetricRegistry());
    transport.setMessageAggregator(new NetflowV9CodecAggregator());
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-netflow,代码行数:14,代码来源:NetFlowUdpTransportTest.java

示例12: SpaceweatherInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@AssistedInject
public SpaceweatherInput(MetricRegistry metricRegistry,
                    @Assisted Configuration configuration,
                    SpaceweatherTransport.Factory transportFactory,
                    LocalMetricRegistry localRegistry,
                    SpaceweatherCodec.Factory codecFactory,
                    Config config,
                    Descriptor descriptor,
                    ServerStatus serverStatus) {
    super(metricRegistry,
            configuration,
            transportFactory.create(configuration),
            localRegistry,
            codecFactory.create(configuration),
            config, descriptor, serverStatus);
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-spaceweather,代码行数:17,代码来源:SpaceweatherInput.java

示例13: RiemannOutput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Inject
public RiemannOutput(@Assisted Configuration configuration) throws MessageOutputConfigurationException {
    this.configuration = configuration;

    try {
        this.riemannClient = getClient(configuration.getString(CK_RIEMANN_PROTOCOL));
        disconnecting.set(false);
        needReconnect.set(false);
        riemannClient.connect();
    } catch (IOException e) {
        LOG.error("Can not connect to Riemann server " + configuration.getString(CK_RIEMANN_HOST), e);
    }

    new Thread(reconnectHandler).start();
    isRunning.set(true);
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-riemann,代码行数:17,代码来源:RiemannOutput.java

示例14: CloudWatchLogsInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Inject
public CloudWatchLogsInput(@Assisted Configuration configuration,
                           MetricRegistry metricRegistry,
                           KinesisTransport.Factory transport,
                           LocalMetricRegistry localRegistry,
                           CloudWatchRawLogCodec.Factory codec,
                           Config config,
                           Descriptor descriptor,
                           ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            transport.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus
    );
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-aws,代码行数:21,代码来源:CloudWatchLogsInput.java

示例15: CloudTrailInput

import org.graylog2.plugin.configuration.Configuration; //导入依赖的package包/类
@Inject
public CloudTrailInput(@Assisted Configuration configuration,
                       MetricRegistry metricRegistry,
                       CloudTrailTransport.Factory transport,
                       LocalMetricRegistry localRegistry,
                       CloudTrailCodec.Factory codec,
                       Config config,
                       Descriptor descriptor,
                       ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            transport.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus);
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-aws,代码行数:20,代码来源:CloudTrailInput.java


注:本文中的org.graylog2.plugin.configuration.Configuration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。