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


Java TextField类代码示例

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


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

示例1: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = new ConfigurationRequest();
    configurationRequest.addField(new TextField(CK_OUTPUT_FOLDER,
            "Output folder in which the output file will be written.",
            "/tmp/", "Output folder in which the output file will be written.",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addField(new TextField(CK_OUTPUT_FILE,
            "File's name in which the output will be written",
            "file_output",
            "File's name in which the output will be written",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addField(new NumberField(CK_FLUSH_TIME,
            "Flush period time in seconds.",
            15,
            "Flush time period/interval",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );

    return configurationRequest;
}
 
开发者ID:scampuza,项目名称:graylog-plugin-file-output,代码行数:24,代码来源:FileOutput.java

示例2: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = ConfigurationRequest.createWithFields(
            new TextField("query", "Query", "", "Query that should be checked", ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("time", "Time Range", 5, "Evaluate the condition for all messages received in the given number of minutes", ConfigurationField.Optional.NOT_OPTIONAL),
            new DropdownField(
                    "threshold_type",
                    "Threshold Type",
                    ThresholdType.MORE.toString(),
                    Arrays.stream(ThresholdType.values()).collect(Collectors.toMap(Enum::toString, ThresholdType::getDescription)),
                    "Select condition to trigger alert: when there are more or less messages than the threshold",
                    ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("threshold", "Threshold", 0.0, "Value which triggers an alert if crossed", ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addFields(AbstractAlertCondition.getDefaultConfigurationFields());
    return configurationRequest;
}
 
开发者ID:alcampos,项目名称:graylog-plugin-alert-conditional-count,代码行数:18,代码来源:ConditionalCountAlertCondition.java

示例3: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final RedisClientConfiguration r = new RedisClientConfiguration(super.getRequestedConfiguration());
    r.addField(new TextField(
            CK_CHANNELS,
            "Channels",
            "",
            "Comma-separated list of channels to subscribe to",
            ConfigurationField.Optional.OPTIONAL));
    r.addField(new TextField(
            CK_PATTERNS,
            "Channel patterns",
            "",
            "Comma-separated list of channel patterns to subscribe to",
            ConfigurationField.Optional.OPTIONAL));

    return r;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-redis,代码行数:19,代码来源:RedisTransport.java

示例4: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = new ConfigurationRequest();

    configurationRequest.addField(new TextField(
                    CK_SPLUNK_HOST, "Splunk Host", "",
                    "Hostname or IP address of a Splunk instance",
                    ConfigurationField.Optional.NOT_OPTIONAL)
    );

    configurationRequest.addField(new NumberField(
                    CK_SPLUNK_PORT, "Splunk Port", 12999,
                    "Port of a Splunk instance",
                    ConfigurationField.Optional.OPTIONAL)
    );

    final Map<String, String> protocols = ImmutableMap.of("TCP", "TCP");
    configurationRequest.addField(new DropdownField(
                    CK_SPLUNK_PROTOCOL, "Splunk Protocol", "TCP", protocols,
                    "Protocol that should be used to send messages to Splunk",
                    ConfigurationField.Optional.OPTIONAL)
    );

    return configurationRequest;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-splunk,代码行数:26,代码来源:SplunkOutput.java

示例5: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = ConfigurationRequest.createWithFields(
            new TextField("query", "Query", "", "Query that should be checked", ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("backtime", "Back Time", 0, "Number of minutes to go back to the past to check the value", ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("staytime", "Stay Time", 1, "Number of minutes of the time to stay in the past", ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addFields(AbstractAlertCondition.getDefaultConfigurationFields());
    return configurationRequest;
}
 
开发者ID:alcampos,项目名称:graylog-plugin-alert-condition-delorean,代码行数:11,代码来源:DeloreanAlertCondition.java

示例6: NsqClientConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
NsqClientConfiguration(Iterable<ConfigurationField> fields) {
    addFields(
            ImmutableList.<ConfigurationField>builder()
                    .addAll(fields)
                    .add(new TextField(
                            LOOKUPD_HTTP_ADDRESS,
                            "Lookupd HTTP addresses",
                            "http://localhost:4161",
                            "Lookupd HTTP addresses: http://host01:4161,http://host02:4161",
                            ConfigurationField.Optional.NOT_OPTIONAL))
                    .add(new TextField(TOPIC,
                            "Topic",
                            "graylog-nsq",
                            "topic with log lines",
                            ConfigurationField.Optional.NOT_OPTIONAL))
                    .add(new TextField(CHANNEL,
                            "CHANNEL",
                            String.format("set-your-channel-%s#ephemeral", RandomStringUtils.randomAlphanumeric(5)),
                            "channel for consumption. Default is emphemeral channel",
                            ConfigurationField.Optional.NOT_OPTIONAL))
                    .add(new NumberField(MAX_IN_FLIGHT,
                            "max in flight",
                            200,
                            "Max number of messages to allow in flight. Default: 200",
                            ConfigurationField.Optional.OPTIONAL))
                    .build()
    );
}
 
开发者ID:condevtec,项目名称:graylog-plugin-nsq,代码行数:29,代码来源:NsqClientConfiguration.java

示例7: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final RedisClientConfiguration r = new RedisClientConfiguration(super.getRequestedConfiguration());
    r.addField(new TextField(CK_CHANNEL,
            "Channel",
            "",
            "Name of the channel to publish messages to",
            ConfigurationField.Optional.NOT_OPTIONAL));
    return r;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-redis,代码行数:11,代码来源:GELFRedisOutput.java

示例8: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    ConfigurationRequest cr = new ConfigurationRequest();

    cr.addField(new TextField(
            CK_TIMEZONE,
            "Timezone",
            DateTimeZone.getDefault().getID(),
            "Timezone of the timestamps in CEF messages. Set this to the local timezone if in doubt. Format example: \"+01:00\" or \"America/Chicago\"",
            ConfigurationField.Optional.NOT_OPTIONAL
    ));
    cr.addField(new TextField(
            CK_LOCALE,
            "Locale",
            "",
            "Locale to use for parsing the timestamps of CEF messages. Set this to english if in doubt. Format example: \"en\" or \"en_US\"",
            ConfigurationField.Optional.OPTIONAL
    ));
    cr.addField(new BooleanField(
            CK_USE_FULL_NAMES,
            "Use full field names",
            false,
            "Use full field names in CEF messages (as defined in the CEF specification)"
    ));

    return cr;
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-cef,代码行数:28,代码来源:CEFCodec.java

示例9: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest cr = new ConfigurationRequest();
    cr.addField(new TextField(CK_KEYSTORE_PATH,
            "Keystore Path",
            "",
            "Absolute path of JKS keystore"));
    cr.addField(new TextField(CK_KEYSTORE_PASSWORD,
            "Keystore Password",
            "",
            "-deststorepass argument in keytool",
            ConfigurationField.Optional.NOT_OPTIONAL,
            TextField.Attribute.IS_PASSWORD));
    cr.addField(new TextField(CK_KEY_PASSWORD,
            "Key Password",
            "",
            "-destkeypass argument in keytool",
            ConfigurationField.Optional.NOT_OPTIONAL,
            TextField.Attribute.IS_PASSWORD));
    cr.addField(new TextField(CK_BIND_IP,
            "Bind IP Address",
            "0.0.0.0",
            "Local IP Address to bind",
            ConfigurationField.Optional.NOT_OPTIONAL));
    cr.addField(new NumberField(CK_BIND_PORT,
            "Port",
            5043,
            "Local port to listen for events",
            ConfigurationField.Optional.NOT_OPTIONAL,
            NumberField.Attribute.IS_PORT_NUMBER));
    return cr;
}
 
开发者ID:sivasamyk,项目名称:graylog2-input-lumberjack,代码行数:33,代码来源:LumberjackTransport.java

示例10: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest cr = new ConfigurationRequest();
    cr.addField(new TextField(CK_BIND_IP,
            "Bind IP Address",
            "0.0.0.0",
            "Local IP Address to bind",
            ConfigurationField.Optional.NOT_OPTIONAL));
    cr.addField(new NumberField(CK_BIND_PORT,
            "Port",
            5044,
            "Local port to listen for events",
            ConfigurationField.Optional.NOT_OPTIONAL,
            NumberField.Attribute.IS_PORT_NUMBER));
    cr.addField(new TextField(CK_KEYSTORE_PATH,
            "Keystore Path",
            "",
            "Absolute path of JKS keystore",
            ConfigurationField.Optional.OPTIONAL));
    cr.addField(new TextField(CK_KEYSTORE_PASSWORD,
            "Keystore Password",
            "",
            "-deststorepass argument in keytool",
            ConfigurationField.Optional.OPTIONAL,
            TextField.Attribute.IS_PASSWORD));
    cr.addField(new TextField(CK_KEY_PASSWORD,
            "Key Password",
            "",
            "-destkeypass argument in keytool",
            ConfigurationField.Optional.OPTIONAL,
            TextField.Attribute.IS_PASSWORD));
    return cr;
}
 
开发者ID:sivasamyk,项目名称:graylog-beats-plugin,代码行数:34,代码来源:BeatsTransport.java

示例11: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
	final ConfigurationRequest configurationRequest = new ConfigurationRequest();
	configurationRequest.addField(new TextField("driver", "Driver to use", "", "Driver to initialize. Needed so URL can be handled properly.", ConfigurationField.Optional.OPTIONAL));
	configurationRequest.addField(new TextField("url", "JDBC URL", "", "Fully qualified url proto://host/db to connect to.", ConfigurationField.Optional.NOT_OPTIONAL));
	configurationRequest.addField(new TextField("username", "Username", "", "Username to connect as. Optional.", ConfigurationField.Optional.OPTIONAL));
	configurationRequest.addField(new TextField("password", "Password", "", "Password for user. Optional.", ConfigurationField.Optional.OPTIONAL));
	configurationRequest.addField(new TextField("fields", "Additional fields", "", "Comma separated list of additional fields for Message insert query", ConfigurationField.Optional.OPTIONAL));
	configurationRequest.addField(new TextField("logInsertQuery", "Message insert query", DEFAULT_LOG_QUERY, "Query to execute to add log entry. Must contain required 4 columns and optional (see Additional fields). Must produce generated key (ID).", ConfigurationField.Optional.NOT_OPTIONAL));
	configurationRequest.addField(new TextField("logInsertAttributeQuery", "Attribute insert query", DEFAULT_LOG_ATTR_QUERY, "Optional. If specified all attributes will be added.", ConfigurationField.Optional.OPTIONAL));			
	return configurationRequest;
}
 
开发者ID:wizecore,项目名称:graylog2-output-jdbc,代码行数:13,代码来源:JDBCOutput.java

示例12: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = new ConfigurationRequest();

    configurationRequest.addField(new TextField(
                    CK_HOST,
                    "Host",
                    "localhost",
                    "host for tcp endpoint",
                    ConfigurationField.Optional.NOT_OPTIONAL)
    );

    configurationRequest.addField(new NumberField(
                    CK_PORT,
                    "Port",
                    12300,
                    "The port on the host to connect to",
                    ConfigurationField.Optional.NOT_OPTIONAL,
                    NumberField.Attribute.ONLY_POSITIVE)
    );
    configurationRequest.addField(new NumberField(
                    CK_WORKERS,
                    "Number of Workers",
                    1,
                    "Number of workers to be instanciated",
                    ConfigurationField.Optional.NOT_OPTIONAL,
                    NumberField.Attribute.ONLY_POSITIVE)
    );


    return configurationRequest;
}
 
开发者ID:comsysto,项目名称:graylog-logstash-tcp-output,代码行数:33,代码来源:TcpLogstashOutput.java

示例13: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = new ConfigurationRequest();

    configurationRequest.addField(new TextField(
            CK_API_TOKEN, "Room Token", "", "HipChat room token",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addField(new TextField(
            CK_ROOM, "Room", "", "ID or name of HipChat room",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addField(new DropdownField(
            CK_COLOR, "Color", "yellow", VALID_COLORS,
            "Background color for message", ConfigurationField.Optional.OPTIONAL)
    );
    configurationRequest.addField(new BooleanField(
            CK_NOTIFY, "Notify", true, "Whether this message should trigger a user notification."));
    configurationRequest.addField(new TextField(
            CK_API_URL, "HipChat API URL", "https://api.hipchat.com",
            "Specify different API URL for self hosted HipChat", ConfigurationField.Optional.OPTIONAL));
    configurationRequest.addField(new TextField(
            CK_GRAYLOG_BASE_URL, "Graylog Base URL", "",
            "Graylog base URL for linking to the stream (e.g. https://your.graylogserver.com).", ConfigurationField.Optional.OPTIONAL));
    configurationRequest.addField(new TextField(
            CK_MESSAGE_TEMPLATE, "Message Template", "",
            "Custom message template (same as email templates).", ConfigurationField.Optional.OPTIONAL, TextField.Attribute.TEXTAREA));

    return configurationRequest;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-hipchat,代码行数:31,代码来源:HipChatAlarmCallback.java

示例14: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest r = super.getRequestedConfiguration();

    final Map<String, String> regions = Arrays.stream(Regions.values())
            .collect(Collectors.toMap(Regions::getName, Regions::toString));

    r.addField(new DropdownField(
            CK_AWS_SQS_REGION,
            "AWS SQS Region",
            DEFAULT_REGION.getName(),
            regions,
            "The AWS region the SQS queue is in.",
            ConfigurationField.Optional.NOT_OPTIONAL
    ));

    r.addField(new DropdownField(
            CK_AWS_S3_REGION,
            "AWS S3 Region",
            DEFAULT_REGION.getName(),
            regions,
            "The AWS region the S3 bucket containing logs is in.",
            ConfigurationField.Optional.NOT_OPTIONAL
    ));

    r.addField(new TextField(
            CK_SQS_NAME,
            "SQS queue name",
            "s3-notifications",
            "The SQS queue that SNS is writing S3 notifications to.",
            ConfigurationField.Optional.NOT_OPTIONAL
    ));

    r.addField(new TextField(
            CK_ACCESS_KEY,
            "AWS access key",
            "",
            "Access key of an AWS user with sufficient permissions. Leave blank to use Instance Profile Credentials. (See documentation)",
            ConfigurationField.Optional.OPTIONAL,
            TextField.Attribute.IS_PASSWORD
    ));

    r.addField(new TextField(
            CK_SECRET_KEY,
            "AWS secret key",
            "",
            "Secret key of an AWS user with sufficient permissions. Leave blank to use Instance Profile Credentials. (See documentation)",
            ConfigurationField.Optional.OPTIONAL,
            TextField.Attribute.IS_PASSWORD
    ));

    r.addField(new NumberField(
            CK_THREAD_COUNT,
            "Processing thread count",
            10,
            "Number of processing threads to pool for SQS/S3 reading",
            ConfigurationField.Optional.NOT_OPTIONAL,
            NumberField.Attribute.ONLY_POSITIVE
    ));

    return r;
}
 
开发者ID:sherzberg,项目名称:graylog-plugin-s3,代码行数:63,代码来源:S3Transport.java

示例15: getRequestedConfiguration

import org.graylog2.plugin.configuration.fields.TextField; //导入依赖的package包/类
@Override
          public ConfigurationRequest getRequestedConfiguration() {
          	ConfigurationRequest configurationRequest = new ConfigurationRequest();

          	Map<String, String> formats = ImmutableMap.of("csv", "CSV", "tsv", "TSV", "pipe", "Pipe", "space", "Space");
          	configurationRequest.addField(new DropdownField(
          			"fileformat", "File Format", "csv", formats,
          			"The file format that should be used to write messages to disk.",
          			ConfigurationField.Optional.NOT_OPTIONAL)
          	);
                      
          	configurationRequest.addField(new TextField("filepath", "File Path", DEFAULTPATH, 
                      "File path to write messages to.  Available substitution variables are $HOST, $NODE, $EPOCH, $PID, $THREAD, $ROTATE, $PADDED.", ConfigurationField.Optional.NOT_OPTIONAL));
              configurationRequest.addField(new TextField("fields", "Fields", DEFAULTFIELDS, "Comma separated fields to export.", ConfigurationField.Optional.NOT_OPTIONAL, TextField.Attribute.TEXTAREA));

          	Map<String, String> endlines = ImmutableMap.of("newline", "Newline", "crlf", "CRLF");
          	configurationRequest.addField(new DropdownField(
          			"endline", "End of Line", "newline", endlines,
          			"The special characters used by systems to represent end of line.",
          			ConfigurationField.Optional.NOT_OPTIONAL)
          	);

         	Map<String, String> compresslist = ImmutableMap.of("none", "None", "gzip", "GZIP", "gzip_fast", "GZIP Fastest", "gzip_max", "GZIP Max Compression");
          	configurationRequest.addField(new DropdownField(
          			"compress", "Compression Options", "none", compresslist,
          			"Optionally compress the file in realtime.",
          			ConfigurationField.Optional.NOT_OPTIONAL)
          	);
                      
              Map<String, String> strategies = ImmutableMap.of("interval", "Interval", "count", "Count");
configurationRequest.addField(new DropdownField(
		"strategy", "Rotation Strategy", "interval", strategies,
		"How the output filename will change to prevent unlimited growth.",
		ConfigurationField.Optional.NOT_OPTIONAL)
);
                      
configurationRequest.addField(new NumberField("rotateinterval", "Rotate Counter", DEFAULTROTATEINT, "Seconds or line count until file rotation, depending on selected strategy.  Disable by setting to zero.", ConfigurationField.Optional.NOT_OPTIONAL, NumberField.Attribute.ONLY_POSITIVE));
              configurationRequest.addField(new TextField("filedone", "Append Extension", DEFAULTDONE, "Append file with extension when rotating.", ConfigurationField.Optional.OPTIONAL));
                                              
              configurationRequest.addField(new NumberField("buffersize", "Buffer Size", DEFAULTBUFFER, "Write buffer in bytes. Must be greater than zero, multiple of 1024 recommended.", ConfigurationField.Optional.NOT_OPTIONAL, NumberField.Attribute.ONLY_POSITIVE));
              configurationRequest.addField(new NumberField("flushinterval", "Flush Interval", DEFAULTINTERVAL, "Seconds to flush write buffer.  Disable by setting to zero.", ConfigurationField.Optional.NOT_OPTIONAL, NumberField.Attribute.ONLY_POSITIVE));

              configurationRequest.addField(new BooleanField("debug", "Debug", false, "Enable debugging to troubleshoot file writes."));
      
return configurationRequest;
          }
 
开发者ID:rswestmoreland,项目名称:graylog-delimited-file-output-plugin,代码行数:47,代码来源:DelimitedFileOutput.java


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