diff options
author | Michael Petretti | 2014-05-19 17:33:17 +0200 |
---|---|---|
committer | Michael Petretti | 2014-05-19 17:33:17 +0200 |
commit | f593a42eae01cbec9c64c1a497205b3b74749438 (patch) | |
tree | 984b4f31fdef0e82594b6d058034dd6e4cd396dd /src/main/java/org/openslx/satellitedaemon/App.java | |
parent | Improvement of FtpConnection Class. (diff) | |
download | satellite-daemon-f593a42eae01cbec9c64c1a497205b3b74749438.tar.gz satellite-daemon-f593a42eae01cbec9c64c1a497205b3b74749438.tar.xz satellite-daemon-f593a42eae01cbec9c64c1a497205b3b74749438.zip |
Added the new FtpUploadWorker-Class
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/App.java')
-rw-r--r-- | src/main/java/org/openslx/satellitedaemon/App.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/App.java b/src/main/java/org/openslx/satellitedaemon/App.java index 073e2e8..a0de29a 100644 --- a/src/main/java/org/openslx/satellitedaemon/App.java +++ b/src/main/java/org/openslx/satellitedaemon/App.java @@ -2,14 +2,19 @@ package org.openslx.satellitedaemon; import java.io.FileNotFoundException; import java.io.IOException; +import java.security.InvalidKeyException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; +import java.security.SignatureException; +import java.security.UnrecoverableKeyException; import java.security.cert.CertificateException; +import java.util.UUID; import org.openslx.imagemaster.thrift.iface.FtpCredentials; +import org.openslx.imagemaster.thrift.iface.ImageData; import org.openslx.imagemaster.thrift.iface.ServerAuthenticationException; import org.openslx.satellitedaemon.ftp.FtpImageUploader; -import org.openslx.satellitedaemon.ftp.FtpConnection; +import org.openslx.satellitedaemon.ftp.ThriftConnection; import org.openslx.satellitedaemon.util.Util; /** @@ -18,12 +23,15 @@ import org.openslx.satellitedaemon.util.Util; */ public class App { - public static void main( String[] args ) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, FileNotFoundException, IOException, ServerAuthenticationException + public static void main( String[] args ) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, FileNotFoundException, IOException, ServerAuthenticationException, UnrecoverableKeyException, InvalidKeyException, SignatureException { // TODO: A Thread that starts the call for new credentials and the upload // whenever a new image was sceduled in the db. - FtpCredentials ftpc = FtpConnection.getFtpCredentials(); + ImageData imDat = new ImageData( UUID.randomUUID().toString(), 113, + "TestImage", System.currentTimeMillis(), System.currentTimeMillis(), "me", "anyThing", + true, false, "best", "theVeryBest", 1024 ); + FtpCredentials ftpc = ThriftConnection.getFtpCredentials(imDat); Util.notNullFatal( ftpc, "ftpc was null" ); FtpImageUploader ftpIU = new FtpImageUploader( ftpc ); Util.notNullFatal( ftpIU, "ftpIU was null" ); |