Package com.enterprisedt.net.ftp.async
Class DisconnectResult
java.lang.Object
com.enterprisedt.net.ftp.async.AsyncResult
com.enterprisedt.net.ftp.async.DisconnectResult
Result returned from disconnect operation
- Version:
- $Revision$
- Author:
- Bruce Blackshaw
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendAsync()This method is called to complete the asynchronous operation.intGet the reason for the disconnectionbooleanReturn true if already disconnected prior to current disconnection attempted.booleanShould this be an immediate disconnection?voidsetAlreadyDisconnected(boolean alreadyDisconnected) Set the flag indicating if already disconnectedvoidsetReason(int reason) Set the reason for the disconnectMethods inherited from class com.enterprisedt.net.ftp.async.AsyncResult
cancelTask, endAsyncCalled, endAsyncInternal, getClient, getLocalContext, getTag, getTask, getTaskDescription, getTaskId, getThrowable, isCompleted, isSuccessful, notifyComplete, setAsIfCompleted, setClient, setEndAsyncCalled, setLocalContext, setSuccessful, setTag, setTask, setThrowable, waitTillComplete
-
Field Details
-
CLIENT_DISCONNECT
public static final int CLIENT_DISCONNECT- See Also:
-
IDLE_TIMEOUT
public static final int IDLE_TIMEOUT- See Also:
-
RECONNECT_FAILED
public static final int RECONNECT_FAILED- See Also:
-
-
Constructor Details
-
DisconnectResult
public DisconnectResult(boolean immediate) Constructor- Parameters:
immediate- true for immediate (forced) disconnection
-
-
Method Details
-
isImmediate
public boolean isImmediate()Should this be an immediate disconnection?- Returns:
- true if immediate, false if not
-
getReason
public int getReason()Get the reason for the disconnection- Returns:
-
getReasonMsg
-
isAlreadyDisconnected
public boolean isAlreadyDisconnected()Return true if already disconnected prior to current disconnection attempted.- Returns:
-
setAlreadyDisconnected
public void setAlreadyDisconnected(boolean alreadyDisconnected) Set the flag indicating if already disconnected- Parameters:
alreadyDisconnected- true if already disconnected when this result was created.
-
setReason
public void setReason(int reason) Set the reason for the disconnect- Parameters:
reason- integer representing reason
-
endAsync
This method is called to complete the asynchronous operation. If the operation is not completed, this method will block until it has. It is normally called from within a callback, which ensures that the operation has indeed already completed.- Throws:
IOExceptionFTPException
-