setMethodIdentifier
setMethodIdentifier(methodIdentifier)
setMethodIdentifier 方法定义了命令对象中包含的命令类型。
*
methodIdentifier - 包含命令类型的字符串。
有效值为:
*
COMMAND_ENDSESSION - 表示 endSession 方法。
*
COMMAND_GETOFFERS - 表示 getOffers 方法。
*
COMMAND_GETPROFILE - 表示 getProfile 方法。
*
COMMAND_GETVERSION - 表示 getVersion 方法。
*
COMMAND_POSTEVENT - 表示 postEvent 方法。
*
COMMAND_SETAUDIENCE - 表示 setAudience 方法。
*
COMMAND_SETDEBUG - 表示 setDebug 方法。
*
COMMAND_STARTSESSION - 表示 startSession 方法。
返回值
无。
示例
以下示例摘自用于调用 getVersionendSessionexecuteBatch 方法。
Command getVersionCommand = new CommandImpl();
getVersionCommand.setMethodIdentifier(Command.COMMAND_GETVERSION);

Command endSessionCommand = new CommandImpl();
endSessionCommand.setMethodIdentifier(Command.COMMAND_ENDSESSION);

Command[] commands =
{
getVersionCommand,
endSessionCommand
};