本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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());
}
示例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);
}
示例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
);
}
示例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
);
}
示例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
);
}
示例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
);
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
示例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
);
}
示例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);
}