Class FtpQueue
- java.lang.Object
-
- org.objectweb.joram.client.jms.admin.FtpQueue
-
public class FtpQueue extends Object
TheFtpQueueclass allows administrators to create FTP queues.A FTP queue is special destinations allowing to transfer file by FTP. It wraps the FTP transfer of a file through a message exchange. The sender starts the transfer by sending a JMS message, and the receiver is notified of the transfer completion by a JMS message.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDefaultFTPImplClass name of default handler allowing to transfer file through FTP.static StringJFTPImplClass name of handler allowing to transfer file using JFTP.
-
Constructor Summary
Constructors Constructor Description FtpQueue()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Queuecreate(int serverId, String name)Administration method creating and deploying a FTP queue on a given server.static Queuecreate(int serverId, String name, Properties props)Administration method creating and deploying a FTP queue on a given server.static Queuecreate(String name)Administration method creating and deploying a FTP queue on the local server.
-
-
-
Field Detail
-
DefaultFTPImpl
public static final String DefaultFTPImpl
Class name of default handler allowing to transfer file through FTP.- See Also:
- Constant Field Values
-
JFTPImpl
public static final String JFTPImpl
Class name of handler allowing to transfer file using JFTP.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static Queue create(String name) throws ConnectException, AdminException
Administration method creating and deploying a FTP queue on the local server.The request fails if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
- Parameters:
name- The name of the created queue.- Returns:
- the created destination.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
create(int, String)
-
create
public static Queue create(int serverId, String name) throws ConnectException, AdminException
Administration method creating and deploying a FTP queue on a given server.The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
- Parameters:
serverId- The identifier of the server where deploying the queue.name- The name of the created queue.- Returns:
- the created destination.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
create
public static Queue create(int serverId, String name, Properties props) throws ConnectException, AdminException
Administration method creating and deploying a FTP queue on a given server.A set of properties is used to configure the FTP destination:
- user - the user name for the FTP.
- pass - the user password for FTP.
- path - the local directory to store the file transferred. Default is the running directory (path=null).
- ftpImplName: The implementation of the FTP transfer, we provide two implementations:
- the default one based on JDK URL:
com.scalagent.joram.mom.dest.ftp.TransferImplRef - the second is based on JFTP:
com.scalagent.joram.mom.dest.ftp.TransferImplJftp.
- the default one based on JDK URL:
msg.setStringProperty("url", "ftp://user:pass@host/file;type=i");The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
- Parameters:
serverId- The identifier of the server where deploying the queue.name- The name of the created queue.props- A Properties object containing all needed parameters.- Returns:
- the created destination.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.
-
-