Package com.rabbitmq.client
Class UnexpectedMethodError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.rabbitmq.client.UnexpectedMethodError
-
- All Implemented Interfaces:
java.io.Serializable
public class UnexpectedMethodError extends java.lang.RuntimeException
Indicates that aMethod
object was supplied that was not expected. For instance,Channel.basicGet(java.lang.String, boolean)
throws this if it receives anything other thanAMQP.Basic.GetOk
orAMQP.Basic.GetEmpty
, and theDefaultMethodVisitor
throws this as the action within each visitor case.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Method
_method
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description UnexpectedMethodError(Method method)
Construct an UnexpectedMethodError with the given method parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Method
getMethod()
Return the wrapped method.java.lang.String
toString()
Return a string representation of this error.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
_method
private final Method _method
-
-
Constructor Detail
-
UnexpectedMethodError
public UnexpectedMethodError(Method method)
Construct an UnexpectedMethodError with the given method parameter- Parameters:
method
- the unexpected method
-
-
Method Detail
-
toString
public java.lang.String toString()
Return a string representation of this error.- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- a string describing the error
-
getMethod
public Method getMethod()
Return the wrapped method.- Returns:
- the method whose appearance was "unexpected" and was deemed an error
-
-