Class IdsResponseMessageFactory


  • public class IdsResponseMessageFactory
    extends java.lang.Object
    The IdsResponseMessageFactory creates IDS compliant ResponseMessage.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.net.URI NULL_CORRELATION_MESSAGE_ID
      It may be necessary to reject messages with a missing message ID.
      static java.net.URI NULL_RECIPIENT_AGENT
      It may be necessary to reject messages with a missing sender agent.
      static java.net.URI NULL_RECIPIENT_CONNECTOR
      It may be necessary to reject messages with a missing issuer connector.
      static java.lang.String NULL_TOKEN
      It may be necessary to reject messages, even when the EDC is not able to provide client credentials for itself.
    • Constructor Summary

      Constructors 
      Constructor Description
      IdsResponseMessageFactory​(@NotNull java.lang.String connectorId, @NotNull org.eclipse.dataspaceconnector.spi.iam.IdentityService identityService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.fraunhofer.iais.eis.RejectionMessage createRejectionMessage​(@NotNull de.fraunhofer.iais.eis.Message correlationMessage, @NotNull java.lang.Exception reason)
      In general using IDS it should always be tried to answer with an IDS message.
      de.fraunhofer.iais.eis.RequestInProcessMessage createRequestInProcessMessage​(@NotNull de.fraunhofer.iais.eis.Message correlationMessage)
      Create IDS compliant RequestInProcessMessage.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NULL_CORRELATION_MESSAGE_ID

        public static final java.net.URI NULL_CORRELATION_MESSAGE_ID
        It may be necessary to reject messages with a missing message ID. In this case this constant can be used as correlation message instead.
      • NULL_RECIPIENT_AGENT

        public static final java.net.URI NULL_RECIPIENT_AGENT
        It may be necessary to reject messages with a missing sender agent. In this case this constant can be used as recipient agent instead.
      • NULL_RECIPIENT_CONNECTOR

        public static final java.net.URI NULL_RECIPIENT_CONNECTOR
        It may be necessary to reject messages with a missing issuer connector. In this case this constant can be used as recipient connector instead.
      • NULL_TOKEN

        public static final java.lang.String NULL_TOKEN
        It may be necessary to reject messages, even when the EDC is not able to provide client credentials for itself. In this case this constant can be used as security token value instead.
        See Also:
        Constant Field Values
    • Constructor Detail

      • IdsResponseMessageFactory

        public IdsResponseMessageFactory​(@NotNull
                                         @NotNull java.lang.String connectorId,
                                         @NotNull
                                         @NotNull org.eclipse.dataspaceconnector.spi.iam.IdentityService identityService)
    • Method Detail

      • createRejectionMessage

        public de.fraunhofer.iais.eis.RejectionMessage createRejectionMessage​(@NotNull
                                                                              @NotNull de.fraunhofer.iais.eis.Message correlationMessage,
                                                                              @NotNull
                                                                              @NotNull java.lang.Exception reason)
        In general using IDS it should always be tried to answer with an IDS message. Therefore, in case an exception occurs while creating an IDS response message, this method should be called. In comparison to the other message creating methods, this one will not throw an exception in case there are issues with the correlation message.
        Parameters:
        correlationMessage - message the rejection is referring to
        reason - exception that was thrown when creating a response message
        Returns:
        RejectionMessage
      • createRequestInProcessMessage

        public de.fraunhofer.iais.eis.RequestInProcessMessage createRequestInProcessMessage​(@NotNull
                                                                                            @NotNull de.fraunhofer.iais.eis.Message correlationMessage)
        Create IDS compliant RequestInProcessMessage.
        Parameters:
        correlationMessage - message the response is referring to
        Returns:
        RequestInProcessMessage