|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.maverick.ssh.SshException
Generic exception for J2SSH Maverick exception handling. When an exception is thrown a reason is attached to the exception so that the developer can determine if its possible to proceed with the connection.
This
Field Summary | |
static int |
AGENT_ERROR
An error has occured within the agent. |
static int |
BAD_API_USAGE
The API has encountered an error because of incorrect usage. |
static int |
CANCELLED_CONNECTION
The user cancelled the connection. |
static int |
CHANNEL_FAILURE
Indicates that a channel has failed; this is used by channel implementations (such as port forwarding or session channels) to indicate that the channel has critically failed. |
static int |
CONNECT_FAILED
The connection could not be established. |
static int |
CONNECTION_CLOSED
An attempt has been made to use a connection that has been closed and is no longer valid. |
static int |
FORWARDING_ERROR
An error has occured the port forwarding system. |
static int |
INTERNAL_ERROR
An internal error occured within the API; in all cases contact 3sp.com support with the details of this error and the state of the connection when receiving this exception is unknown. |
static int |
JCE_ERROR
An error occured in the JCE; typically this would result from Maverick attempting to use an algorithm that the JCE does not support. |
static int |
KEY_EXCHANGE_FAILED
The protocol failed to negotiate a transport algorithm or failed to verify the host key of the remote host. |
static int |
LICENSE_ERROR
The API is not licensed! |
static int |
POSSIBLE_CORRUPT_FILE
An error occured reading the contents of a file. |
static int |
PROMPT_TIMEOUT
The Shell class failed to detect the prompt. |
static int |
PROTOCOL_VIOLATION
The SSH protocol was violated in some way by the remote host and the connection has been terminated. |
static int |
PSEUDO_TTY_ERROR
A request was made to allocate a pseudo terminal, but this request failed. |
static int |
REMOTE_HOST_DISCONNECTED
The remote host disconnected following the normal SSH protocol disconnection procedure. |
static int |
SCP_TRANSFER_CANCELLED
The user cancelled an active SCP transfer. |
static int |
SESSION_STREAM_ERROR
An error occured whilst accessing a sessions streams |
static int |
SHELL_ERROR
A request was made to start a shell, but this request failed. |
static int |
SOCKET_TIMEOUT
The API detected a socket timeout |
static int |
UNEXPECTED_TERMINATION
The connection unexpectedly terminated and so the connection can no longer be used. |
static int |
UNSUPPORTED_ALGORITHM
In setting up a context an algorithm was specified that is not supported by the API. |
Constructor Summary | |
SshException(int reason,
java.lang.Throwable cause)
Create an exception with the given cause and reason. |
|
SshException(java.lang.String msg,
int reason)
Create an exception with the given description and reason. |
|
SshException(java.lang.String msg,
int reason,
java.lang.Throwable cause)
Create an exception with the given description cause, reason. |
|
SshException(java.lang.String msg,
java.lang.Throwable cause)
Create an exception with the given description and cause. |
|
SshException(java.lang.Throwable cause)
Create an exception by providing the cause of the error. |
|
SshException(java.lang.Throwable cause,
int reason)
|
Method Summary | |
java.lang.Throwable |
getCause()
If an INTERNAL_ERROR reason is given this method MAY return the cause of the error. |
int |
getReason()
Get the reason for the exception |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNEXPECTED_TERMINATION
public static final int REMOTE_HOST_DISCONNECTED
public static final int PROTOCOL_VIOLATION
public static final int BAD_API_USAGE
public static final int INTERNAL_ERROR
public static final int CHANNEL_FAILURE
public static final int UNSUPPORTED_ALGORITHM
public static final int CANCELLED_CONNECTION
public static final int KEY_EXCHANGE_FAILED
public static final int CONNECT_FAILED
public static final int LICENSE_ERROR
public static final int CONNECTION_CLOSED
public static final int AGENT_ERROR
public static final int FORWARDING_ERROR
public static final int PSEUDO_TTY_ERROR
public static final int SHELL_ERROR
public static final int SESSION_STREAM_ERROR
public static final int JCE_ERROR
public static final int POSSIBLE_CORRUPT_FILE
public static final int SCP_TRANSFER_CANCELLED
public static final int SOCKET_TIMEOUT
public static final int PROMPT_TIMEOUT
Constructor Detail |
public SshException(java.lang.String msg, int reason)
msg
- reason
- public SshException(int reason, java.lang.Throwable cause)
reason
- cause
- public SshException(java.lang.Throwable cause, int reason)
public SshException(java.lang.String msg, java.lang.Throwable cause)
INTERNAL_ERROR
.
msg
- cause
- public SshException(java.lang.Throwable cause)
cause
- public SshException(java.lang.String msg, int reason, java.lang.Throwable cause)
msg
- reason
- cause
- Method Detail |
public int getReason()
public java.lang.Throwable getCause()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |