次の方法で共有


LinkErrorContext Class

public class LinkErrorContext
extends SessionErrorContext

Represents the context for an AMQP link when an AmqpException occurs.

Constructor Summary

Constructor Description
LinkErrorContext(String namespace, String entityPath, String trackingId, Integer linkCredit)

Creates a new instance with the AMQP link's namespace and entityPath information.

Method Summary

Modifier and Type Method and Description
Integer getLinkCredit()

Gets the number of credits on the link when the error occurred.

String getTrackingId()

Gets the unique tracking identifier for this error.

String toString()

Creates a string representation of this ErrorContext.

Methods inherited from AmqpErrorContext

Methods inherited from SessionErrorContext

Methods inherited from java.lang.Object

Constructor Details

LinkErrorContext

public LinkErrorContext(String namespace, String entityPath, String trackingId, Integer linkCredit)

Creates a new instance with the AMQP link's namespace and entityPath information. Allows for optional information about the link if it was successfully opened such as linkCredit and trackingId.

Parameters:

namespace - The service namespace of the error context.
entityPath - The remote container the AMQP receive link is fetching messages from.
trackingId - The tracking id for the error. Tracking id can be null if the error was not thrown from the remote AMQP message broker.
linkCredit - the number of link credits the current AMQP link has when this error occurred, can be null if the receive link has not opened yet.

Method Details

getLinkCredit

public Integer getLinkCredit()

Gets the number of credits on the link when the error occurred. Can be null if the link is not opened.

Returns:

The number of credits on the link when the error occurred.

getTrackingId

public String getTrackingId()

Gets the unique tracking identifier for this error. It is possible to be null if the error was not thrown from the AMQP message broker.

Returns:

The unique tracking identifier for this error.

toString

public String toString()

Creates a string representation of this ErrorContext.

Overrides:

LinkErrorContext.toString()

Applies to