com.enterprisedt.net.ftp.async
Class DisconnectResult

java.lang.Object
  extended by com.enterprisedt.net.ftp.async.AsyncResult
      extended by com.enterprisedt.net.ftp.async.DisconnectResult

public class DisconnectResult
extends AsyncResult

Result returned from disconnect operation

Version:
$Revision: 1.9 $
Author:
Bruce Blackshaw

Field Summary
static int CLIENT_DISCONNECT
           
static int IDLE_TIMEOUT
           
static int RECONNECT_FAILED
           
 
Constructor Summary
DisconnectResult(boolean immediate)
          Constructor
 
Method Summary
 void endAsync()
          This method is called to complete the asynchronous operation.
 int getReason()
          Get the reason for the disconnection
 java.lang.String getReasonMsg()
           
 boolean isAlreadyDisconnected()
          Return true if already disconnected prior to current disconnection attempted.
 boolean isImmediate()
          Should this be an immediate disconnection?
 void setAlreadyDisconnected(boolean alreadyDisconnected)
          Set the flag indicating if already disconnected
 void setReason(int reason)
          Set the reason for the disconnect
 
Methods 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLIENT_DISCONNECT

public static final int CLIENT_DISCONNECT
See Also:
Constant Field Values

IDLE_TIMEOUT

public static final int IDLE_TIMEOUT
See Also:
Constant Field Values

RECONNECT_FAILED

public static final int RECONNECT_FAILED
See Also:
Constant Field Values
Constructor Detail

DisconnectResult

public DisconnectResult(boolean immediate)
Constructor

Parameters:
immediate - true for immediate (forced) disconnection
Method Detail

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

public java.lang.String 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

public void endAsync()
              throws FTPException,
                     java.io.IOException
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:
java.io.IOException
FTPException


Copyright © 2001-2006 Enterprise Distributed Technologies Ltd. All Rights Reserved.