com.taobao.metamorphosis.client.extension.spring
类 MessageBuilder

java.lang.Object
  继承者 com.taobao.metamorphosis.client.extension.spring.MessageBuilder

public class MessageBuilder
extends Object

Message builder to build metaq message.

从以下版本开始:
1.4.5
作者:
dennis

方法摘要
 Message build()
          Build a message.
<T> Message
build(MessageBodyConverter<T> converter)
          Build message by message body converter.
 MessageBuilder withAttribute(String attr)
          Configure message attribute
 MessageBuilder withBody(Object obj)
          Configure message body object if the payload byte array is not exists.
 MessageBuilder withPayload(byte[] payload)
          Configure message payload if the message body object is not exists.
static MessageBuilder withTopic(String topic)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

withTopic

public static final MessageBuilder withTopic(String topic)

withAttribute

public final MessageBuilder withAttribute(String attr)
Configure message attribute

参数:
attr -
返回:
从以下版本开始:
1.4.5

withBody

public final MessageBuilder withBody(Object obj)
Configure message body object if the payload byte array is not exists.

参数:
obj -
返回:
从以下版本开始:
1.4.5

withPayload

public final MessageBuilder withPayload(byte[] payload)
Configure message payload if the message body object is not exists.

参数:
payload -
返回:
从以下版本开始:
1.4.5

build

public Message build()
Build a message.

返回:
从以下版本开始:
1.4.5

build

public <T> Message build(MessageBodyConverter<T> converter)
Build message by message body converter.

参数:
converter -
返回:
从以下版本开始:
1.4.5


Copyright © 2010–2013. All rights reserved.