setAudienceID
setAudienceID(
audienceID
)
setAudienceID
方法定义
setAudience
和
startSession
命令的受众标识。
audienceID
- 用于定义受众标识的一组 NameValuePair 对象。
返回值
无。
示例
以下示例摘自用于调用
startSession
和
setAudience
的
executeBatch
方法。
NameValuePair custId = new NameValuePairImpl();
custId.setName("CustomerId");
custId.setValueAsNumeric(1.0);
custId.setValueDataType(NameValuePair.DATA_TYPE_NUMERIC);
NameValuePair[] initialAudienceId = { custId };
. . .
Command startSessionCommand = new CommandImpl();
startSessionCommand.setAudienceID(initialAudienceId);
. . .
Command setAudienceCommand = new CommandImpl();
setAudienceCommand.setAudienceID(newAudienceId);
. . .
/** Build command array */
Command[] commands =
{
startSessionCommand,
setAudienceCommand,
};
/** Make the call */
BatchResponse batchResponse = api.executeBatch(sessionId, commands);
/** Process the response appropriately */
processExecuteBatchResponse(batchResponse);
Copyright IBM Corporation 2012. All Rights Reserved.