@ApiStatus.Internal public class MessengerException extends AgqlRuntimeException
Represents a transaction error. Provides the underlying context that was used for the transaction. This should not be made available to the user. Concrete messengers should wrap this exception to avoid exposing the context to the user.
Constructor and Description |
---|
MessengerException(NettyChannelContext context)
Constructor for MessengerException.
|
MessengerException(String message,
NettyChannelContext context)
Constructor for MessengerException.
|
MessengerException(String message,
Throwable cause,
boolean enableSuppression,
boolean writableStackTrace,
NettyChannelContext context)
Constructor for MessengerException.
|
MessengerException(String message,
Throwable cause,
NettyChannelContext context)
Constructor for MessengerException.
|
MessengerException(Throwable cause,
NettyChannelContext context)
Constructor for MessengerException.
|
Modifier and Type | Method and Description |
---|---|
<C extends NettyChannelContext> |
getContext()
The underlying
NettyChannelContext used for this transaction. |
InetSocketAddress |
getLocalAddress()
The local address of the connection used for this transaction
|
InetSocketAddress |
getRemoteAddress()
The remote address of the connection used for this transaction
|
<R extends AbstractRequest> |
getRequest()
The originating request of the transaction
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MessengerException(NettyChannelContext context)
Constructor for MessengerException.
context
- a NettyChannelContext
objectpublic MessengerException(String message, NettyChannelContext context)
Constructor for MessengerException.
message
- a String
objectcontext
- a NettyChannelContext
objectpublic MessengerException(String message, Throwable cause, NettyChannelContext context)
Constructor for MessengerException.
message
- a String
objectcause
- a Throwable
objectcontext
- a NettyChannelContext
objectpublic MessengerException(Throwable cause, NettyChannelContext context)
Constructor for MessengerException.
cause
- a Throwable
objectcontext
- a NettyChannelContext
objectpublic MessengerException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, NettyChannelContext context)
Constructor for MessengerException.
message
- a String
objectcause
- a Throwable
objectenableSuppression
- a booleanwritableStackTrace
- a booleancontext
- a NettyChannelContext
objectpublic <R extends AbstractRequest> R getRequest()
R
- a R classAbstractRequest
public final InetSocketAddress getLocalAddress()
InetSocketAddress
containing the host and portpublic final InetSocketAddress getRemoteAddress()
InetSocketAddress
containing the host and portpublic final <C extends NettyChannelContext> C getContext()
NettyChannelContext
used for this transaction.C
- a C classNettyChannelContext
that was used for this transaction. null
if the exception occured before a context has been acquired.Copyright © 2016–2024. All rights reserved.