Class PartitionContext
java.lang.Object
com.azure.messaging.eventhubs.models.PartitionContext
A model class to contain partition information of an Event Hub.
-
Constructor Summary
ConstructorDescriptionPartitionContext
(String fullyQualifiedNamespace, String eventHubName, String consumerGroup, String partitionId) Creates an instance of PartitionContext that contains partition information. -
Method Summary
Modifier and TypeMethodDescriptionGets the consumer group name associated with the consumer of an Event Hub.Gets the Event Hub name.Returns the fully qualified namespace of the Event Hub.Gets the partition id of the Event Hub.
-
Constructor Details
-
PartitionContext
public PartitionContext(String fullyQualifiedNamespace, String eventHubName, String consumerGroup, String partitionId) Creates an instance of PartitionContext that contains partition information.- Parameters:
fullyQualifiedNamespace
- The fully qualified namespace of the Event Hub.eventHubName
- The Event Hub name.consumerGroup
- The consumer group name associated with the consumer of an Event Hub.partitionId
- The partition id of the partition.- Throws:
NullPointerException
- iffullyQualifiedNamespace
,partitionId
,eventHubName
orconsumerGroup
or isnull
.
-
-
Method Details
-
getFullyQualifiedNamespace
Returns the fully qualified namespace of the Event Hub.- Returns:
- the fully qualified namespace of the Event Hub.
-
getPartitionId
Gets the partition id of the Event Hub.- Returns:
- the partition id of the Event Hub.
-
getEventHubName
Gets the Event Hub name.- Returns:
- The Event Hub name.
-
getConsumerGroup
Gets the consumer group name associated with the consumer of an Event Hub.- Returns:
- The consumer group name associated with the consumer of an Event Hub.
-