@Provider @Produces(value="application/pkcs7-signature") public class PKCS7SignatureWriter extends Object implements AsyncMessageBodyWriter<SignedOutput>
| Modifier and Type | Field and Description |
|---|---|
protected javax.ws.rs.ext.Providers |
providers |
| Constructor and Description |
|---|
PKCS7SignatureWriter() |
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<Void> |
asyncWriteTo(SignedOutput out,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
AsyncOutputStream entityStream)
Write a type to an HTTP message using async IO.
|
long |
getSize(SignedOutput smimeOutput,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
static byte[] |
sign(javax.ws.rs.ext.Providers providers,
SignedOutput out) |
void |
writeTo(SignedOutput out,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<SignedOutput>public long getSize(SignedOutput smimeOutput, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<SignedOutput>public void writeTo(SignedOutput out, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<SignedOutput>IOExceptionjavax.ws.rs.WebApplicationExceptionpublic CompletionStage<Void> asyncWriteTo(SignedOutput out, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, AsyncOutputStream entityStream)
AsyncMessageBodyWriterasyncWriteTo in interface AsyncMessageBodyWriter<SignedOutput>out - the instance to write.type - the class of instance that is to be written.genericType - the type of instance to be written. GenericEntity
provides a way to specify this information at runtime.annotations - an array of the annotations attached to the message entity instance.mediaType - the media type of the HTTP entity.headers - a mutable map of the HTTP message headers.entityStream - the AsyncOutputStream for the HTTP entity. The
implementation should not close the output stream.CompletionStage indicating completionpublic static byte[] sign(javax.ws.rs.ext.Providers providers,
SignedOutput out)
throws IOException,
NoSuchAlgorithmException,
NoSuchProviderException,
org.bouncycastle.cms.CMSException,
org.bouncycastle.operator.OperatorCreationException,
CertificateEncodingException
IOExceptionNoSuchAlgorithmExceptionNoSuchProviderExceptionorg.bouncycastle.cms.CMSExceptionorg.bouncycastle.operator.OperatorCreationExceptionCertificateEncodingExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.