Class AmqpSupport
- java.lang.Object
-
- org.apache.qpid.jms.provider.amqp.AmqpSupport
-
public class AmqpSupport extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.qpid.proton.amqp.SymbolANONYMOUS_RELAYstatic org.apache.qpid.proton.amqp.SymbolCONNECTION_OPEN_FAILEDstatic org.apache.qpid.proton.amqp.SymbolCONTAINER_IDstatic org.apache.qpid.proton.amqp.SymbolCOPYstatic org.apache.qpid.proton.amqp.SymbolDELAYED_DELIVERYstatic org.apache.qpid.proton.amqp.SymbolDYNAMIC_NODE_LIFETIME_POLICYstatic org.apache.qpid.proton.amqp.SymbolFAILOVER_SERVER_LISTstatic org.apache.qpid.proton.amqp.SymbolGLOBALstatic org.apache.qpid.proton.amqp.SymbolINVALID_FIELDstatic org.apache.qpid.proton.amqp.SymbolJMS_NO_LOCAL_SYMBOLstatic org.apache.qpid.proton.amqp.SymbolJMS_SELECTOR_SYMBOLstatic org.apache.qpid.proton.amqp.messaging.ModifiedMODIFIED_FAILEDstatic org.apache.qpid.proton.amqp.messaging.ModifiedMODIFIED_FAILED_UNDELIVERABLEstatic org.apache.qpid.proton.amqp.SymbolNETWORK_HOSTstatic org.apache.qpid.proton.amqp.SymbolOPEN_HOSTNAMEstatic org.apache.qpid.proton.amqp.SymbolPATHstatic org.apache.qpid.proton.amqp.SymbolPLATFORMstatic org.apache.qpid.proton.amqp.SymbolPORTstatic org.apache.qpid.proton.amqp.SymbolPRODUCTstatic org.apache.qpid.proton.amqp.SymbolQUEUE_PREFIXstatic org.apache.qpid.proton.amqp.messaging.RejectedREJECTEDstatic org.apache.qpid.proton.amqp.SymbolSCHEMEstatic org.apache.qpid.proton.amqp.SymbolSHAREDstatic org.apache.qpid.proton.amqp.SymbolSHARED_SUBSstatic org.apache.qpid.proton.amqp.SymbolSOLE_CONNECTION_CAPABILITYstatic StringSUB_NAME_DELIMITERstatic StringTEMP_QUEUE_CREATORstatic StringTEMP_TOPIC_CREATORstatic org.apache.qpid.proton.amqp.SymbolTOPIC_PREFIXstatic org.apache.qpid.proton.amqp.SymbolVERSION
-
Constructor Summary
Constructors Constructor Description AmqpSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ProviderConnectionRemotelyClosedExceptionconvertToConnectionClosedException(AmqpProvider provider, org.apache.qpid.proton.engine.Endpoint endpoint, org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition)Given an ErrorCondition instance create a new Exception that best matches the error type that indicates the connection creation failed for some reason.static ProviderExceptionconvertToNonFatalException(AmqpProvider provider, org.apache.qpid.proton.engine.Endpoint endpoint, org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition)Given an ErrorCondition instance create a new Exception that best matches the error type that indicates a non-fatal error usually at the link level such as link closed remotely or link create failed due to security access issues.static ProviderConnectionRemotelyClosedExceptioncreateRedirectException(AmqpProvider provider, org.apache.qpid.proton.amqp.Symbol error, String message, org.apache.qpid.proton.amqp.transport.ErrorCondition condition)When a redirect type exception is received this method is called to create the appropriate redirect exception type containing the error details needed.static StringextractErrorMessage(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition)Attempt to read and return the embedded error message in the given ErrorCondition object.
-
-
-
Field Detail
-
SOLE_CONNECTION_CAPABILITY
public static final org.apache.qpid.proton.amqp.Symbol SOLE_CONNECTION_CAPABILITY
-
ANONYMOUS_RELAY
public static final org.apache.qpid.proton.amqp.Symbol ANONYMOUS_RELAY
-
DELAYED_DELIVERY
public static final org.apache.qpid.proton.amqp.Symbol DELAYED_DELIVERY
-
SHARED_SUBS
public static final org.apache.qpid.proton.amqp.Symbol SHARED_SUBS
-
CONNECTION_OPEN_FAILED
public static final org.apache.qpid.proton.amqp.Symbol CONNECTION_OPEN_FAILED
-
INVALID_FIELD
public static final org.apache.qpid.proton.amqp.Symbol INVALID_FIELD
-
CONTAINER_ID
public static final org.apache.qpid.proton.amqp.Symbol CONTAINER_ID
-
FAILOVER_SERVER_LIST
public static final org.apache.qpid.proton.amqp.Symbol FAILOVER_SERVER_LIST
-
PATH
public static final org.apache.qpid.proton.amqp.Symbol PATH
-
SCHEME
public static final org.apache.qpid.proton.amqp.Symbol SCHEME
-
PORT
public static final org.apache.qpid.proton.amqp.Symbol PORT
-
NETWORK_HOST
public static final org.apache.qpid.proton.amqp.Symbol NETWORK_HOST
-
OPEN_HOSTNAME
public static final org.apache.qpid.proton.amqp.Symbol OPEN_HOSTNAME
-
QUEUE_PREFIX
public static final org.apache.qpid.proton.amqp.Symbol QUEUE_PREFIX
-
TOPIC_PREFIX
public static final org.apache.qpid.proton.amqp.Symbol TOPIC_PREFIX
-
PRODUCT
public static final org.apache.qpid.proton.amqp.Symbol PRODUCT
-
VERSION
public static final org.apache.qpid.proton.amqp.Symbol VERSION
-
PLATFORM
public static final org.apache.qpid.proton.amqp.Symbol PLATFORM
-
COPY
public static final org.apache.qpid.proton.amqp.Symbol COPY
-
JMS_NO_LOCAL_SYMBOL
public static final org.apache.qpid.proton.amqp.Symbol JMS_NO_LOCAL_SYMBOL
-
JMS_SELECTOR_SYMBOL
public static final org.apache.qpid.proton.amqp.Symbol JMS_SELECTOR_SYMBOL
-
SHARED
public static final org.apache.qpid.proton.amqp.Symbol SHARED
-
GLOBAL
public static final org.apache.qpid.proton.amqp.Symbol GLOBAL
-
REJECTED
public static final org.apache.qpid.proton.amqp.messaging.Rejected REJECTED
-
MODIFIED_FAILED
public static final org.apache.qpid.proton.amqp.messaging.Modified MODIFIED_FAILED
-
MODIFIED_FAILED_UNDELIVERABLE
public static final org.apache.qpid.proton.amqp.messaging.Modified MODIFIED_FAILED_UNDELIVERABLE
-
DYNAMIC_NODE_LIFETIME_POLICY
public static final org.apache.qpid.proton.amqp.Symbol DYNAMIC_NODE_LIFETIME_POLICY
-
TEMP_QUEUE_CREATOR
public static final String TEMP_QUEUE_CREATOR
- See Also:
- Constant Field Values
-
TEMP_TOPIC_CREATOR
public static final String TEMP_TOPIC_CREATOR
- See Also:
- Constant Field Values
-
SUB_NAME_DELIMITER
public static final String SUB_NAME_DELIMITER
- See Also:
- Constant Field Values
-
-
Method Detail
-
convertToConnectionClosedException
public static ProviderConnectionRemotelyClosedException convertToConnectionClosedException(AmqpProvider provider, org.apache.qpid.proton.engine.Endpoint endpoint, org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition)
Given an ErrorCondition instance create a new Exception that best matches the error type that indicates the connection creation failed for some reason.- Parameters:
provider- the AMQP provider instance that originates this exceptionendpoint- The target of the error.errorCondition- The ErrorCondition returned from the remote peer.- Returns:
- a new Exception instance that best matches the ErrorCondition value.
-
convertToNonFatalException
public static ProviderException convertToNonFatalException(AmqpProvider provider, org.apache.qpid.proton.engine.Endpoint endpoint, org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition)
Given an ErrorCondition instance create a new Exception that best matches the error type that indicates a non-fatal error usually at the link level such as link closed remotely or link create failed due to security access issues.- Parameters:
provider- the AMQP provider instance that originates this exceptionendpoint- The target of the error.errorCondition- The ErrorCondition returned from the remote peer.- Returns:
- a new Exception instance that best matches the ErrorCondition value.
-
extractErrorMessage
public static String extractErrorMessage(org.apache.qpid.proton.amqp.transport.ErrorCondition errorCondition)
Attempt to read and return the embedded error message in the given ErrorCondition object. If no message can be extracted a generic message is returned.- Parameters:
errorCondition- The ErrorCondition to extract the error message from.- Returns:
- an error message extracted from the given ErrorCondition.
-
createRedirectException
public static ProviderConnectionRemotelyClosedException createRedirectException(AmqpProvider provider, org.apache.qpid.proton.amqp.Symbol error, String message, org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
When a redirect type exception is received this method is called to create the appropriate redirect exception type containing the error details needed.- Parameters:
provider- the AMQP provider instance that originates this exceptionerror- the Symbol that defines the redirection error type.message- the basic error message that should used or amended for the returned exception.condition- the ErrorCondition that describes the redirection.- Returns:
- an Exception that captures the details of the redirection error.
-
-