Interface IProcessorModule

All Superinterfaces:
IDynamicComponent
All Known Subinterfaces:
IProcessorActiveModule, IProcessorReceiverModule, IProcessorResenderModule, IProcessorSenderModule, IProcessorStorageModule
All Known Implementing Classes:
AbstractActiveModule, AbstractActiveNetModule, AbstractActivePollingModule, AbstractActiveReceiverModule, AbstractActiveResenderModule, AbstractDirectoryPollingModule, AbstractHttpSenderModule, AbstractProcessorModule, AbstractResenderModule, AbstractSenderModule, AbstractStorageModule, AS2DirectoryPollingModule, AS2MDNReceiverModule, AS2ReceiverModule, AS2SenderModule, AsynchMDNSenderModule, DirectoryResenderModule, ImmediateResenderModule, InMemoryResenderModule, MDNFileModule, MessageFileModule

public interface IProcessorModule extends IDynamicComponent
A processor module is a module that is to be used within an IMessageProcessor instance.
Author:
OpenAS2
  • Method Details

    • canHandle

      boolean canHandle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String,Object> aOptions)
      Check if this processor module can handle a certain action on the provided message
      Parameters:
      sAction - The action to be executed. Never null.
      aMsg - The message in question. May be an AS2 message or an MDN message. Never null.
      aOptions - The options to be considered. May be null.
      Returns:
      true of this module can handle the respective message, false if not.
    • handle

      void handle(@Nonnull String sAction, @Nonnull IMessage aMsg, @Nullable Map<String,Object> aOptions) throws AS2Exception
      Main handling of the message. Only called, if canHandle(String, IMessage, Map) returned true.
      Parameters:
      sAction - The action to be executed. Never null.
      aMsg - The message in question. May be an AS2 message or an MDN message. Never null.
      aOptions - The options to be considered. May be null.
      Throws:
      AS2Exception - in case something goes wrong