org.jclouds.io.Payload.isRepeatable()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.jclouds.io.Payload.isRepeatable()方法的一些代码示例,展示了Payload.isRepeatable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Payload.isRepeatable()方法的具体详情如下:
包路径:org.jclouds.io.Payload
类名称:Payload
方法名:isRepeatable

Payload.isRepeatable介绍

[英]Tells if the payload is capable of producing its data more than once.
[中]指示有效负载是否能够多次生成其数据。

代码示例

代码示例来源:origin: jclouds/legacy-jclouds

/**
* {@inheritDoc}
*/
@Override
public boolean isRepeatable() {
 return delegate.isRepeatable();
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

/**
* {@inheritDoc}
*/
@Override
public boolean isRepeatable() {
 return delegate.isRepeatable();
}

代码示例来源:origin: org.jclouds/jclouds-core

/**
* {@inheritDoc}
*/
@Override
public boolean isRepeatable() {
 return delegate.isRepeatable();
}

代码示例来源:origin: Nextdoor/bender

/**
* {@inheritDoc}
*/
@Override
public boolean isRepeatable() {
 return delegate.isRepeatable();
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

/**
* {@inheritDoc}
*/
@Override
public boolean isRepeatable() {
 return delegate.isRepeatable();
}

代码示例来源:origin: apache/jclouds

/**
* {@inheritDoc}
*/
@Override
public boolean isRepeatable() {
 return delegate.isRepeatable();
}

代码示例来源:origin: Nextdoor/bender

@Override
public boolean isRepeatable() {
 return this.payload.isRepeatable();
}

代码示例来源:origin: org.apache.jclouds.api/s3

@Override
public boolean isRepeatable() {
 return this.payload.isRepeatable();
}

代码示例来源:origin: apache/jclouds

@Override
public boolean isRepeatable() {
 return this.payload.isRepeatable();
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

/**
* Commands need to be replayed, if redirected or on a retryable error. Typically, this implies
* the payload carried is not a streaming type.
*/
public boolean isReplayable() {
 return (request.getPayload() == null) ? true : request.getPayload().isRepeatable();
}

代码示例来源:origin: jclouds/legacy-jclouds

/**
* Commands need to be replayed, if redirected or on a retryable error. Typically, this implies
* the payload carried is not a streaming type.
*/
public boolean isReplayable() {
 return (request.getPayload() == null) ? true : request.getPayload().isRepeatable();
}

代码示例来源:origin: org.jclouds/jclouds-core

/**
* Commands need to be replayed, if redirected or on a retryable error. Typically, this implies
* the payload carried is not a streaming type.
*/
public boolean isReplayable() {
 return (request.getPayload() == null) ? true : request.getPayload().isRepeatable();
}

代码示例来源:origin: Nextdoor/bender

/**
* Commands need to be replayed, if redirected or on a retryable error. Typically, this implies
* the payload carried is not a streaming type.
*/
public boolean isReplayable() {
 return (request.getPayload() == null) ? true : request.getPayload().isRepeatable();
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

/**
* Commands need to be replayed, if redirected or on a retryable error. Typically, this implies
* the payload carried is not a streaming type.
*/
public boolean isReplayable() {
 return (request.getPayload() == null) ? true : request.getPayload().isRepeatable();
}

代码示例来源:origin: apache/jclouds

/**
* Commands need to be replayed, if redirected or on a retryable error. Typically, this implies
* the payload carried is not a streaming type.
*/
public boolean isReplayable() {
 return (request.getPayload() == null) ? true : request.getPayload().isRepeatable();
}

代码示例来源:origin: org.apache.jclouds.api/chef

@VisibleForTesting
String hashBody(Payload payload) {
 if (payload == null)
   return emptyStringHash;
 payload = useTheFilePartIfForm(payload);
 checkArgument(payload != null, "payload was null");
 checkArgument(payload.isRepeatable(), "payload must be repeatable: " + payload);
 try {
   return base64().encode(ByteStreams2.hashAndClose(payload.getInput(), sha1()).asBytes());
 } catch (Exception e) {
   Throwables.propagateIfPossible(e);
   throw new HttpException("error creating sigature for payload: " + payload, e);
 }
}

代码示例来源:origin: apache/jclouds

@VisibleForTesting
String hashBody(Payload payload) {
 if (payload == null)
   return emptyStringHash;
 payload = useTheFilePartIfForm(payload);
 checkArgument(payload != null, "payload was null");
 checkArgument(payload.isRepeatable(), "payload must be repeatable: " + payload);
 try {
   return base64().encode(ByteStreams2.hashAndClose(payload.getInput(), sha1()).asBytes());
 } catch (Exception e) {
   Throwables.propagateIfPossible(e);
   throw new HttpException("error creating sigature for payload: " + payload, e);
 }
}

代码示例来源:origin: org.jclouds.api/chef

@VisibleForTesting
String hashBody(Payload payload) {
 if (payload == null)
   return emptyStringHash;
 payload = useTheFilePartIfForm(payload);
 checkArgument(payload != null, "payload was null");
 checkArgument(payload.isRepeatable(), "payload must be repeatable: " + payload);
 try {
   return base64().encode(ByteSources.asByteSource(payload.getInput()).hash(sha1()).asBytes());
 } catch (Exception e) {
   Throwables.propagateIfPossible(e);
   throw new HttpException("error creating sigature for payload: " + payload, e);
 }
}

代码示例来源:origin: jclouds/legacy-jclouds

/**
* Content stream may need to be read. However, we should always close the http stream.
* 
* @throws IOException
*/
public static byte[] closeClientButKeepContentStream(PayloadEnclosing response) {
 byte[] returnVal = toByteArrayOrNull(response);
 if (returnVal != null && !response.getPayload().isRepeatable()) {
   Payload newPayload = Payloads.newByteArrayPayload(returnVal);
   MutableContentMetadata fromMd = response.getPayload().getContentMetadata();
   MutableContentMetadata toMd = newPayload.getContentMetadata();
   copy(fromMd, toMd);
   response.setPayload(newPayload);
 }
 return returnVal;
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

/**
* Content stream may need to be read. However, we should always close the http stream.
* 
* @throws IOException
*/
public static byte[] closeClientButKeepContentStream(PayloadEnclosing response) {
 byte[] returnVal = toByteArrayOrNull(response);
 if (returnVal != null && !response.getPayload().isRepeatable()) {
   Payload newPayload = Payloads.newByteSourcePayload(ByteSource.wrap(returnVal));
   MutableContentMetadata fromMd = response.getPayload().getContentMetadata();
   MutableContentMetadata toMd = newPayload.getContentMetadata();
   copy(fromMd, toMd);
   response.setPayload(newPayload);
 }
 return returnVal;
}

相关文章