Class SignaturePipe

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasTransactionAttribute, IConfigurable, IForwardTarget, IPipe, IScopeProvider, IWithParameters, NameAware, HasKeystore, EventThrowing, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle

@Forward(name="failure", description="verification has failed") @EnterpriseIntegrationPattern(TRANSLATOR) public class SignaturePipe extends FixedForwardPipe implements HasKeystore
Specific parameters
signature the signature to verify
  • Field Details

  • Constructor Details

    • SignaturePipe

      public SignaturePipe()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from class: FixedForwardPipe
      checks for correct configuration of forward
      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class FixedForwardPipe
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • start

      public void start()
      Description copied from interface: IPipe
      Perform necessary action to start the pipe. This method is executed after the IConfigurable.configure() method, for each start and stop command of the adapter.
      Specified by:
      start in interface IPipe
      Specified by:
      start in interface org.springframework.context.Lifecycle
      Overrides:
      start in class AbstractPipe
    • doPipe

      public PipeRunResult doPipe(Message message, PipeLineSession session) throws PipeRunException
      Description copied from interface: IPipe
      This is where the action takes place. Pipes may only throw a PipeRunException, to be handled by the caller of this object. Implementations must either consume the message, or pass it on to the next Pipe in the PipeRunResult. If the result of the Pipe does not depend on the input, like for the FixedResultPipe, the Pipe can schedule the input to be closed at session exit, by calling #closeOnCloseOf(PipeLineSession) This allows the previous Pipe to release any resources (e.g. connections) that it might have kept open until the message was consumed. Doing so avoids connections leaking from pools, while it enables efficient streaming processing of data while it is being read from a stream.
      Specified by:
      doPipe in interface IPipe
      Throws:
      PipeRunException
    • setAction

      public void setAction(SignaturePipe.Action action)
      Action to be taken when pipe is executed.
      Default value
      SIGN
    • setAlgorithm

      public void setAlgorithm(String algorithm)
      The signing algorithm
      Default value
      ALGORITHM_DEFAULT
    • setProvider

      public void setProvider(String provider)
      Cryptography provider
    • setSignatureBase64

      public void setSignatureBase64(boolean signatureBase64)
      if true, the signature is (expected to be) base64 encoded
      Default value
      true
    • setKeystore

      public void setKeystore(String string)
      Keystore to obtain signing key
      Specified by:
      setKeystore in interface HasKeystore
    • setKeystoreType

      public void setKeystoreType(KeystoreType value)
      Type of keystore, can be pkcs12 or pem
      Specified by:
      setKeystoreType in interface HasKeystore
      Default value
      pkcs12
    • setKeystoreAuthAlias

      public void setKeystoreAuthAlias(String string)
      Alias used to obtain keystore password
      Specified by:
      setKeystoreAuthAlias in interface HasKeystore
    • setKeystorePassword

      public void setKeystorePassword(String string)
      Keystore password
      Specified by:
      setKeystorePassword in interface HasKeystore
    • setKeystoreAlias

      public void setKeystoreAlias(String string)
      Alias in keystore
      Specified by:
      setKeystoreAlias in interface HasKeystore
    • setKeystoreAliasAuthAlias

      public void setKeystoreAliasAuthAlias(String string)
      Alias used to obtain keystoreAlias password
      Specified by:
      setKeystoreAliasAuthAlias in interface HasKeystore
    • setKeystoreAliasPassword

      public void setKeystoreAliasPassword(String string)
      KeystoreAlias password
      Specified by:
      setKeystoreAliasPassword in interface HasKeystore
    • setKeyManagerAlgorithm

      public void setKeyManagerAlgorithm(String keyManagerAlgorithm)
      Description copied from interface: HasKeystore
      Key manager algorithm. Can be left empty to use the servers default algorithm
      Specified by:
      setKeyManagerAlgorithm in interface HasKeystore
    • getAction

      public SignaturePipe.Action getAction()
    • getAlgorithm

      public String getAlgorithm()
    • getProvider

      public String getProvider()
    • isSignatureBase64

      public boolean isSignatureBase64()
    • getKeystore

      public String getKeystore()
      Specified by:
      getKeystore in interface HasKeystore
    • getKeystoreType

      public KeystoreType getKeystoreType()
      Specified by:
      getKeystoreType in interface HasKeystore
    • getKeystoreAuthAlias

      public String getKeystoreAuthAlias()
      Specified by:
      getKeystoreAuthAlias in interface HasKeystore
    • getKeystorePassword

      public String getKeystorePassword()
      Specified by:
      getKeystorePassword in interface HasKeystore
    • getKeystoreAlias

      public String getKeystoreAlias()
      Specified by:
      getKeystoreAlias in interface HasKeystore
    • getKeystoreAliasAuthAlias

      public String getKeystoreAliasAuthAlias()
      Specified by:
      getKeystoreAliasAuthAlias in interface HasKeystore
    • getKeystoreAliasPassword

      public String getKeystoreAliasPassword()
      Specified by:
      getKeystoreAliasPassword in interface HasKeystore
    • getKeyManagerAlgorithm

      public String getKeyManagerAlgorithm()
      Specified by:
      getKeyManagerAlgorithm in interface HasKeystore