本文整理汇总了Java中lilypad.client.connect.api.result.impl.GetKeyResult类的典型用法代码示例。如果您正苦于以下问题:Java GetKeyResult类的具体用法?Java GetKeyResult怎么用?Java GetKeyResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GetKeyResult类属于lilypad.client.connect.api.result.impl包,在下文中一共展示了GetKeyResult类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: exec
import lilypad.client.connect.api.result.impl.GetKeyResult; //导入依赖的package包/类
@Override
public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException {
try {
GetKeyResult result = CHLilyPadStatic.getConnect(t).request(new GetKeyRequest()).awaitUninterruptibly();
CArray r = CHLilyPadStatic.evaluate(result, t);
r.set("key", result.getKey());
return r;
} catch (RequestException ex) {
throw new ConfigRuntimeException(ex.getMessage(), Exceptions.ExceptionType.PluginInternalException, t);
}
}
示例2: decode
import lilypad.client.connect.api.result.impl.GetKeyResult; //导入依赖的package包/类
public GetKeyResult decode(StatusCode statusCode, ByteBuf buffer) {
if(statusCode == StatusCode.SUCCESS) {
return new GetKeyResult(BufferUtils.readString(buffer));
} else {
return new GetKeyResult(statusCode);
}
}
示例3: getResult
import lilypad.client.connect.api.result.impl.GetKeyResult; //导入依赖的package包/类
public Class<GetKeyResult> getResult() {
return GetKeyResult.class;
}
示例4: getResult
import lilypad.client.connect.api.result.impl.GetKeyResult; //导入依赖的package包/类
/**
*
* @return accompanying result of the request
*/
public Class<GetKeyResult> getResult() {
return GetKeyResult.class;
}