Filecatalyst bietet viele Möglichkeiten zur Integration in 3rd-Party-Anwendungen und Workflows. Unser SDK bietet eine vollständige Palette von Komponenten für eine Vielzahl von Programmiersprachen und Umgebungen.

Antrag Test

Komponente Technologie Filecatalyst Produkt
Client-API Java, C ++ *, iOS *, Android *, .NET * Direct, Workflow-
Java-Applets, JavaScript-API Alle bisherigen Web-Browser mit dem Java-Plug-in Direkt
Remote-Verwaltung Java, REST Direct, Workflow-
CLI / Shell Scripting Befehlszeile* Direct, Workflow-
C ++ API / CLI Nicht-Java Command Line & API Direkt

* Transfer vom und zum Workflow- und nur Dateibereichen Webmail.

Das Development Kit ist die Grundlage unserer Produkte; wenn Sie irgendwelche qualifizierenden Produkte besitzen, kann das Development Kit als Add-on lizenziert werden. Für eigenständige Entwicklung wird das SDK der Regel hinzugefügt, um Filecatalyst Direkt; jedoch sind einige Komponenten entwickelt, um mit Filecatalyst-Workflow zu interagieren.

Uhr-SDK Webinar

Download accompanying Beispiel-Quellcode hier

Client-API

Our well-documented API gives access to every method needed to establish a connection to a FileCatalyst Server for accelerated file transfers. With a few short lines of code, you can be underway. Default values are used for most functions, with a full range of method calls allowing you to access advanced features.

Der Client-API ermöglicht es Ihnen, auch programmatisch Jobs und Dateien auf Filecatalyst-Workflow oder Webmail einreichen.

importieren unlimited.fc.client.api. *; import java.io. *; public class UploadSample {public static void main (String args []) throws Exception {FCClient fc = new FCClient ( "192.168.1.30", 21); fc.setShowConsoleLog (true); fc.initialize (); fc.connect (); fc.login ( "anonymous", "me@email.com"); fc.setMode (TransferMode.UDP); // Stellen Sie die Startgeschwindigkeit und Zielrate unverändert. Es wird sich verlangsamen, wenn Staus auftreten. fc.setStartRate (10000); fc.setTargetRate (10000); fc.setVerifyIntegrity (true); TransferHook upload = fc.upload (new File ( "c: /temp/500MB.zip")); während (! upload.isTransferComplete ()) {// könnten Sie einige Fortschritte Informationen hier mit den verschiedenen Methoden in der // TransferHook Objekt anzuzeigen, wenn (upload.getStatusCode () == upload.TRANSFERRING) {System.out.println (upload .getPercent () + "% "+ upload.getRate () +" Kbps"); } Try {Thread.sleep (1000); } Catch (InterruptedException ex) {}} vom Server fc.disconnect trennen // (); // aufzuräumen fc.finish (); }}
import unlimited.fc.client.api.*;
import java.io.*;
import java.util.*;
import java.util.Observable;
import java.io.IOException;
import unlimited.fc.com.FCException;

/**
 * This example illustrates the use of Observables to monitor a TransferHook object.
 */

public class UploadSampleAdvanced implements Observer {

  TransferHook upload = null;

  public void go() throws IOException, FCException {

    FCClient fc = new FCClient("192.168.1.30", 2057);
    fc.setShowConsoleLog(true);
    fc.initialize();
    fc.connect();
    fc.login("anonymous", "me@email.com");

    // Let's auto detect the transfer mode.  Unless RTT is high enough, FTP gets used.
    fc.setMode(TransferMode.AUTO);

    // lets send at a constant 1500 Kbps, no congestion control.
    // the congestion control only comes into play if FC gets detected as the best transfer mode
    fc.setUseCongestionControl(false);
    fc.setTargetRate(1500);

    // verify the file afterwards
    fc.setVerifyIntegrity(true);
    upload = fc.upload(new File("c:/bigfiles/500MB"));
    upload.addObserver(this);

    try {
      synchronized (this) {
        wait();
      }
    }
    catch (InterruptedException ex) {
    }

    // disconnect from the server
    fc.disconnect();

    // clean up
    fc.finish();
  }

  public void update(Observable observable, Object object) {

    if (!upload.isTransferComplete() && !upload.isTransferCancelled() &&
        !upload.isTransferError()) {
      if (upload.getStatusCode() == upload.TRANSFERRING &&
          upload.getCurrentPercent() != 100) {
        printProgress(upload.getRate(), upload.getCurrentPercent());
      }
      else if (upload.getStatusCode() == upload.DONEFILE) {
        printProgress(upload.getRate(), 100);
      }
    }
    else {
      // all files complete
      synchronized (this) {
        notifyAll();
      }
    }
  }

  public void printProgress(int rate, int percent) {
    System.out.println(percent + "%");
    System.out.println(rate + " kbps");
  }

  public static void main(String args[]) throws Exception {
    new UploadSampleAdvanced().go();
  }
}

Server-API

Der Server Java und REST-APIs jedes Verfahren aussetzen benötigten Benutzer und Anforderung Sitzungsinformationen auf dem Filecatalyst Server zu verwalten.

// Example below is sample code in which the application tries to create a user and
 // wraps up logic for reconnection attempts should the communication between the ServerAPI
 // and the Server be severed.

 // Call to setup initial connection to FileCatalyst Server
 public void init() throws Exception {
   FCServer fcserver = new FCServer();
   // connection parameters
   fcserver.setHostname("localhost");
   fcserver.setPort(12400);
   fcserver.setUserName("admin");
   fcserver.setPassword("system");
   // connect
   fcserver.connect();
 }

 // attempts a reconnection
 private void reconnect () throws Exception {
   try {
     fcserver.disconnect();
   } catch (Exception e) {
   }
   fcserver.connect();
 }

 //
 // Method to modify login credentials for a user.  If the user does not yet exist, create the
 // user as well.
 // @param fcUserName FTP Login name
 // @param fcPassword Password the user wants to have
 // @throws Exception If you cannot connect to the server after 3 attempts, or the server is not allowing you to
 //                   create/modify the user.
 //
 public void createOrModifyUserCredentials(String fcUserName, String fcPassword) throws Exception {
   // Get the FileCatalyst user.
   int MAXATTEMPTS = 3;
   UserContainer fcUser = null;
   int retryAttempts = 0;
   while (fcUser == null && retryAttempts < MAXATTEMPTS ) {
     // try to connect if we've lost the connection
     if (!fcserver.isConnected()) {
       reconnect();
     }
     try {
       fcUser = fcserver.getUser(fcUserName);
       if (fcUser == null) {
         // null return indicates user does not exist -- create
         fcserver.addUser(fcUserName, fcPassword);
         // test to see if the user is really there
         fcserver.resynchConfigurationFiles();
         fcUser = fcserver.getUser(fcUserName);
         if (fcUser == null) {
           throw new Exception("FileCatalyst user could not be created with user name '" + fcUserName + "'");
         }
         return;
       } else {
         fcserver.modUserPassword(fcUserName, fcPassword);
         return;
       }
     } catch (AdminConnectionException e) {
       // conection foobared.  Let's try again
       retryAttempts++;
     }
   }
   throw new Exception("Cannot connect to FCServer, reached max attempts");
}

Mobile APIs

Easily create fast file transfer apps for Apple iOS and Google Android. FileCatalyst provides a native Objective-C API for iOS and a Java API for Android Dalvik.

Errichtet unter Verwendung der mobilen API, unsere Filecatalyst App ist ab sofort verfügbar für Androide
und iOS.

//
//  FCAViewController.m
//  example
//
//  Copyright (c) 2012 Unlimi-Tech Software Inc.. All rights reserved.
//
//  This sample code will upload and then download a file named
//  "nature-q-c-320-320-7.jpg" (bundled with the SDK)

#import "FCAViewController.h"
#import "NSString+FCAUtils.h"

@interface FCAViewController ()

@property (strong, nonatomic) FCAControl *control;

@end

@implementation FCAViewController
@synthesize connectionStatusLabel;
@synthesize connectionDetailLabel;
@synthesize transferStatusLabel;
@synthesize transferDetailLabel;
@synthesize cancelButton;
@synthesize downloadButton;
@synthesize uploadButton;
@synthesize connectButton;
@synthesize control;


- (void)reportError:(NSError*)error {
    if (!error) return;

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
                                                    message:error.localizedDescription
                                                   delegate:nil
                                          cancelButtonTitle:@"OK"
                                          otherButtonTitles:nil];
    [alert show];
}

// Basic file upload. The control instance has its own private work queue that all commands (except cancelTransfer) must
// be executed on. To do this, there are two helper methods, performBlock:completion: and performBlockAndWait:
// If any command inside the block fails, it will be reported in the NSError instance passed to the completion block,
// or returned from the performBlockAndWait: call.

- (IBAction)uploadAction:(id)sender {
    [self.uploadButton setTitle:@"Uploading..." forState:UIControlStateNormal];
    self.uploadButton.enabled = NO;

    [self.control performBlock:^{
        NSString *filename = @"nature-q-c-320-320-7.jpg";
        NSURL *fileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"nature-q-c-320-320-7" ofType:@"jpg"]];

        [control uploadFile:fileURL toPath:filename transferStarted:^(FCAFileTransferStats *stats) {
            // this callback is invoked on the main queue
            self.transferStatusLabel.text = filename;
            self.cancelButton.hidden = NO;
            NSLog(@"transfer has started");
        } transferCompleted:^(FCAFileTransferStats *stats) {
            // this callback is invoked on the main queue
            NSLog(@"transfer has completed");
            self.transferStatusLabel.text = [NSString stringWithFormat:@"%@ finished", filename];
            self.cancelButton.hidden = YES;
        }];

    } completion:^(NSError *error) {
        [self reportError:error];
        [self.uploadButton setTitle:@"Test Upload" forState:UIControlStateNormal];
        self.uploadButton.enabled = YES;
    }];
}

- (IBAction)downloadAction:(UIButton *)sender {
    [self.downloadButton setTitle:@"Downloading..." forState:UIControlStateNormal];
    self.downloadButton.enabled = NO;

    [self.control performBlock:^{
        NSString *filename = @"nature-q-c-320-320-7.jpg";
        NSURL *documentsDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory
                                                                            inDomains:NSUserDomainMask] lastObject];
        NSURL *fileURL = [documentsDirectory URLByAppendingPathComponent:filename];

        [control downloadFile:filename
                        toURL:fileURL
              transferStarted:^(FCAFileTransferStats *stats) {
                  self.transferStatusLabel.text = filename;
                  self.cancelButton.hidden = NO;

              } transferCompleted:^(FCAFileTransferStats *stats) {
                  self.transferStatusLabel.text = [NSString stringWithFormat:@"%@ finished", filename];
                  self.cancelButton.hidden = YES;
              }];
    } completion:^(NSError *error) {
        [self reportError:error];
        [self.downloadButton setTitle:@"Test Download" forState:UIControlStateNormal];
        self.downloadButton.enabled = YES;
    }];
}

// This method shows how to use the nonblocking connect/disconnect calls
- (IBAction)connectAction:(UIButton *)sender {
    if ([self.control isConnected]) {
        sender.enabled = NO;
        [sender setTitle:@"Disconnecting..." forState:UIControlStateNormal];

        [self.control performBlock:^{
            [self.control disconnect];
        } completion:^(NSError *error) {
            sender.enabled = YES;
            [self reportError:error];
        }];
    } else {
        sender.enabled = NO;
        [sender setTitle:@"Connecting..." forState:UIControlStateNormal];

        [self.control performBlock:^{
            [self.control connect];
        } completion:^(NSError *error) {
            sender.enabled = YES;
            [self reportError:error];
        }];
    }
}

- (IBAction)cancelAction:(UIButton *)sender {
    [self.control cancelTransfer];
}


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // create an FCAControl instance and set the connection options
        self.control = [[FCAControl alloc] init];
        self.control.username = @"user";
        self.control.password = @"test";
        self.control.hostname = @"10.0.1.2";
        self.control.port = 8123;

        // some options that are not required to set
        control.useSSL = NO;
        control.autoResumeEnabled = NO;
        control.fileExistsOverride = YES;
    }
    return self;
}

- (void)configureControlStats {
    self.connectionDetailLabel.text = [NSString stringOfTransferRate:self.control.bitsPerSecondAverageTransferRate];
}

- (void)configureView {
    NSString *connectionStatus = nil;

    if ([self.control isConnected]) {
        [self.connectButton setTitle:@"Disconnect" forState:UIControlStateNormal];
        self.uploadButton.hidden = NO;
        self.downloadButton.hidden = NO;
        connectionStatus = @"connected";
    } else {
        [self.connectButton setTitle:@"Connect" forState:UIControlStateNormal];
        self.uploadButton.hidden = YES;
        self.downloadButton.hidden = YES;
        connectionStatus = @"not connected";
    }

    self.connectionStatusLabel.text = [NSString stringWithFormat:@"%@:%d (%@)",
                                       self.control.hostname, self.control.port, connectionStatus];
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    // there are notifications for the connect and disconnect events
    [[NSNotificationCenter defaultCenter] addObserverForName:FCAControlConnectedKey
                                                      object:self.control
                                                       queue:[NSOperationQueue mainQueue]
                                                  usingBlock:^(NSNotification *note) {
                                                      [self configureView];
                                                  }];

    [[NSNotificationCenter defaultCenter] addObserverForName:FCAControlDisconnectedKey
                                                      object:self.control
                                                       queue:[NSOperationQueue mainQueue]
                                                  usingBlock:^(NSNotification *note) {
                                                      [self configureView];
                                                  }];

    // during transfers, the Control instance will periodically send out a notification with updated
    // connection statistics
    [[NSNotificationCenter defaultCenter] addObserverForName:FCAControlUpdatedKey
                                                      object:self.control
                                                       queue:[NSOperationQueue mainQueue]
                                                  usingBlock:^(NSNotification *note) {
                                                      [self configureControlStats];
                                                  }];


    [self configureView];
}

- (void)viewDidUnload
{
    [self setConnectionStatusLabel:nil];
    [self setConnectionDetailLabel:nil];
    [self setTransferStatusLabel:nil];
    [self setTransferDetailLabel:nil];
    [self setCancelButton:nil];
    [self setDownloadButton:nil];
    [self setUploadButton:nil];
    [self setConnectButton:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        return YES;
    }
}

@end

For Dalvik code, please see the Client-API sample.

HotFolder REST-API

The HotFolder REST API exposes methods to add new watch folders, add new sites, and create/manipulate/execute tasks.

 

TransferAgent JavaScript und REST-API

The TransferAgent JavaScript and REST APIs allow for tight integration with any web application.  It allows web applications to access/browse the local file systems, add files to a queue, initiate and monitor ongoing file transfers.  All of this can be done though JavaScript, or directly through REST calls.

 

Zentral REST-API

The FileCatalyst Central API provides access to all reporting data for all connected nodes, and also acts as a reverse HTTP proxy to access the REST APIs of individual connected nodes, like Server, HotFolder and TransferAgent (coming in v3.7).

 

Workflow-REST-API

A RESTful API for FileCatalyst Workflow exposes a number of management functions through the web. These include:

  • Hinzufügen / Bearbeiten / Löschen von Benutzern
  • Hinzufügen / Bearbeiten / Löschen von Gruppen
  • Hinzufügen / Bearbeiten / Löschen von Bestellformulare
  • Hinzufügen / Bearbeiten / Löschen von FTP-Sites
  • Liste Job Felder

.NET Wrapper

The .NET wrapper offers transparent and thread-safe access to the FileCatalyst command-line in .NET. One potential application is to use
FileCatalyst technology to develop within the Microsoft development framework. The .NET wrapper requires an official Java runtime and FileCatalyst CLI.

Klicken Beispiel-Screenshot zu sehen

Command Line Interface

Using the CLI, access FileCatalyst functionality through virtually any scripting language, or from many other programming languages. Any tool able to output to the command line can be used to trigger FileCatalyst file transfers.

C ++ Native Client-Bibliothek

FileCatalyst products are built using Java as the main programming language. This has always
allowed us to keep a centralized code base and be compatible across multiple platforms and browsers
(via Java Applet Plugin). 95% of systems (desktop/laptop/servers) found on the market today, including
Windows, MacOSX, Linux, Solaris, and AIX, can utilize our existing software.

However, there are certain systems where Java is not available. In many set top boxes and embedded systems
(network appliance, gaming consoles), Java is not installed or available. This ecosystem was unable to take
advantage of our solutions.

In light of this, we have developed a C++ client solution. Available as both a native C++ API or as a native
command-line executable (.exe for Windows, 32 or 64-bit binary for Linux), our FileCatalyst C++ client will
allow file transfer acceleration on systems that do not have Java installed.

 

C ++ Webinar

#include <FileCatalyst.hpp>

void example( const std::string &serverIpOrHostname, 
              const std::string &username, 
              const std::string &password )
{
    // Set a few options needed by fc::Control so it knows how to behave.
    fc::Options options;
    options.setFtpServer( serverIpOrHostname, 21 );
    options.setUsernameAndPassword( username, password );
    options.setMd5Verification( true );
    options.setMode( fc::kUdp );
    // Create the FTP fc::Control object.  Once it is created, the
    // fc::Options object is no longer required and can go out-of-scope.
    fc::Control ftp( options );
    // Connect to the server with the options originally provided by
    // fc::Options.  If connect() is not explicitly called, then the
    // connection is deferred until a method is called which needs to
    // communicate directly with the server.
    ftp.connect();
    // Note that even after a connection has been established, many (but
    // not all) FTP settings can still be modified.
    fc::Options newOptions = ftp.getOptions();
    newOptions.setBandwidth( fc::k100_Mbps );
    ftp.setNewOptions( newOptions );
    // Download some files from the server.
    ftp.prepareRecursiveDir( fc::Remote("/project"), fc::Local("/tmp") );
    ftp.download();
    ...
}

We have currently ported the library to the following platforms:

    • Windows 32-Bit
    • Windows 64-Bit


  • Linux 64-Bit (deb)
  • Linux 64-Bit (Rpm)
  • Linux ARM 7 32-Bit (deb)
  • Linux ARM 7 32-Bit (Rpm)
  • OSX 64-bit

Wenn Sie einen Port an eine bestimmte Plattform benötigen, kontaktieren Sie uns mit den Details.

Antrag Test