Package org.restlet.engine.connector
Class FtpClientHelper
- java.lang.Object
-
- org.restlet.engine.Helper
-
- org.restlet.engine.RestletHelper<T>
-
- org.restlet.engine.connector.ConnectorHelper<org.restlet.Client>
-
- org.restlet.engine.connector.ClientHelper
-
- org.restlet.engine.connector.FtpClientHelper
-
public class FtpClientHelper extends ClientHelper
FTP client connector using theURLConnection
. Here is the list of parameters that are supported. They should be set in the Client's context before it is started:list of supported parameters Parameter name Value type Default value Description allowUserInteraction boolean false If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog. readTimeout int 60000 Sets the read timeout to a specified timeout, in milliseconds. A timeout of zero is interpreted as an infinite timeout. useCaches boolean false If true, the protocol is allowed to use caching whenever it can. - Author:
- Jerome Louvel
- See Also:
- Networking Features
-
-
Constructor Summary
Constructors Constructor Description FtpClientHelper(org.restlet.Client client)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getReadTimeout()
Returns the read timeout value.int
getSocketConnectTimeoutMs()
Returns the connection timeout.void
handle(org.restlet.Request request, org.restlet.Response response)
Handles a call.boolean
isAllowUserInteraction()
Indicates if this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog.boolean
isUseCaches()
Indicates if the protocol is allowed to use caching whenever it can.void
start()
Start callback.void
stop()
Stop callback.-
Methods inherited from class org.restlet.engine.connector.ConnectorHelper
getConnectorService, getContext, getProtocols, update
-
Methods inherited from class org.restlet.engine.RestletHelper
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
-
-
-
-
Method Detail
-
getReadTimeout
public int getReadTimeout()
Returns the read timeout value. A timeout of zero is interpreted as an infinite timeout.- Returns:
- The read timeout value.
-
getSocketConnectTimeoutMs
public int getSocketConnectTimeoutMs()
Returns the connection timeout. Defaults to 15000.- Returns:
- The connection timeout.
-
handle
public void handle(org.restlet.Request request, org.restlet.Response response)
Description copied from class:RestletHelper
Handles a call.- Overrides:
handle
in classRestletHelper<org.restlet.Client>
- Parameters:
request
- The request to handle.response
- The response to update.
-
isAllowUserInteraction
public boolean isAllowUserInteraction()
Indicates if this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog.- Returns:
- True if it makes sense to allow user interactions.
-
isUseCaches
public boolean isUseCaches()
Indicates if the protocol is allowed to use caching whenever it can.- Returns:
- True if the protocol is allowed to use caching whenever it can.
-
start
public void start() throws java.lang.Exception
Description copied from class:RestletHelper
Start callback.- Overrides:
start
in classConnectorHelper<org.restlet.Client>
- Throws:
java.lang.Exception
-
stop
public void stop() throws java.lang.Exception
Description copied from class:RestletHelper
Stop callback.- Overrides:
stop
in classConnectorHelper<org.restlet.Client>
- Throws:
java.lang.Exception
-
-