Class CloseContext

java.lang.Object
com.azure.messaging.eventhubs.models.CloseContext

public class CloseContext extends Object
This class contains information about a partition for which this EventProcessorClient stopped processing.
  • Constructor Details

    • CloseContext

      public CloseContext(PartitionContext partitionContext, CloseReason closeReason)
      Creates a new instance of CloseContext.
      Parameters:
      partitionContext - The partition information for which the processing stopped.
      closeReason - The reason for stopping the event processing.
      Throws:
      NullPointerException - if partitionContext or closeReason is null.
  • Method Details

    • getPartitionContext

      public PartitionContext getPartitionContext()
      Returns the partition information for which the processing stopped.
      Returns:
      The partition information for which the processing stopped.
    • getCloseReason

      public CloseReason getCloseReason()
      Returns the reason for stopping the event processing.
      Returns:
      The reason for stopping the event processing.