146.4. HipChat Producer

制作者可同时发送消息到 Room's 和 User。交换的正文作为消息发送。示例用法如下所示:需要设置适当的标头。

@Override
 public void configure() throws Exception {
  String hipchatEndpointUri = "hipchat://?authToken=XXXX";
  from("direct:start")
   .to(hipchatEndpointUri)
   .to("mock:result");
 }

146.4.1. Hipchat producer 评估的消息标头

标头常数类型描述

HipchatToUser

HipchatConstants.TO_USER

字符串

需要发送消息的 Hipchat 用户。

HipchatToRoom

HipchatConstants.TO_ROOM

字符串

需要向其发送消息的 Hipchat 空间。

HipchatMessageFormat

HipchatConstants.MESSAGE_FORMAT

字符串

有效格式为 'text' 或 'html'。默认:'text'

HipchatMessageBackgroundColor

HipchatConstants.MESSAGE_BACKGROUND_COLOR

字符串

有效颜色值为 'yellow', 'green', 'red', 'purple', 'gray', 'random'。默认:'yellow'(仅限使用) 

HipchatTriggerNotification

HipchatConstants.TRIGGER_NOTIFY

字符串

有效值为 'true' 或 'false'。此消息是否应触发用户通知(更改 tab 颜色,播放声音、通知手机等等)。默认:'false'(仅限为 )