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


Java Stream.getId方法代码示例

本文整理汇总了Java中org.graylog2.plugin.streams.Stream.getId方法的典型用法代码示例。如果您正苦于以下问题:Java Stream.getId方法的具体用法?Java Stream.getId怎么用?Java Stream.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.graylog2.plugin.streams.Stream的用法示例。


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

示例1: buildStreamURL

import org.graylog2.plugin.streams.Stream; //导入方法依赖的package包/类
/**
 * Build stream URL string
 * @param baseUrl
 * @param stream
 * @return
 */
protected String buildStreamURL (final String configURL, final Stream stream) {
  
  String baseUrl = configURL;

  if (!baseUrl.endsWith("/")) {
    baseUrl += "/";
  }
  
  return baseUrl + "streams/" + stream.getId() + "/messages?q=*&rangetype=relative&relative=3600";
}
 
开发者ID:magicdude4eva,项目名称:graylog-jira-alarmcallback,代码行数:17,代码来源:JiraAlarmCallback.java

示例2: formatAlarmNotification

import org.graylog2.plugin.streams.Stream; //导入方法依赖的package包/类
private String formatAlarmNotification(final Stream stream, final AlertCondition.CheckResult result) {
    return "Graylog alert for stream <" + stream.getTitle() + ">\n\n"
            + "Date: " + result.getTriggeredAt() + "\n"
            + "Stream ID: " + stream.getId() + "\n"
            + "Stream title: " + stream.getTitle() + "\n"
            + "Triggered condition: " + result.getTriggeredCondition() + "\n";
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-jabber,代码行数:8,代码来源:JabberAlarmCallbackFormatter.java

示例3: buildStreamLink

import org.graylog2.plugin.streams.Stream; //导入方法依赖的package包/类
protected String buildStreamLink(String baseUrl, Stream stream) {
    if (!baseUrl.endsWith("/")) {
        baseUrl = baseUrl + "/";
    }

    return baseUrl + "streams/" + stream.getId() + "/messages?q=%2A&rangetype=relative&relative=3600";
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-slack,代码行数:8,代码来源:SlackPluginBase.java

示例4: buildStreamDetailsURL

import org.graylog2.plugin.streams.Stream; //导入方法依赖的package包/类
public static String buildStreamDetailsURL(URI baseUri, AlertCondition.CheckResult checkResult, Stream stream) throws AlarmCallbackException {
    if (baseUri != null && !Strings.isNullOrEmpty(baseUri.getHost())) {
        int time = 5;
        if (checkResult.getTriggeredCondition().getParameters().get("time") != null) {
            time = ((Integer) checkResult.getTriggeredCondition().getParameters().get("time")).intValue();
        }
        DateTime dateAlertEnd = checkResult.getTriggeredAt();
        DateTime dateAlertStart = dateAlertEnd.minusMinutes(time);
        String alertStart = Tools.getISO8601String(dateAlertStart);
        String alertEnd = Tools.getISO8601String(dateAlertEnd);
        return baseUri + "/streams/" + stream.getId() + "/messages?rangetype=absolute&from=" + alertStart + "&to=" + alertEnd + "&q=*";
    } else {
        throw new AlarmCallbackException("Please configure a valid Graylog Base URL in the alarm callback parameters.");
    }
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-hipchat,代码行数:16,代码来源:HipChatTrigger.java

示例5: buildStreamURL

import org.graylog2.plugin.streams.Stream; //导入方法依赖的package包/类
protected String buildStreamURL(String baseUrl, Stream stream) {
    if (!baseUrl.endsWith("/")) {
        baseUrl += "/";
    }
    return baseUrl + "streams/" + stream.getId() + "/messages?q=*&rangetype=relative&relative=3600";
}
 
开发者ID:tjackiw,项目名称:graylog-plugin-jira,代码行数:7,代码来源:JiraPluginBase.java


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