FileCatalyst ofrece muchas opciones para la integración en aplicaciones 3 ª parte y flujos de trabajo. Nuestro SDK cuenta con una amplia gama de componentes para una variedad de lenguajes y entornos de desarrollo.

solicitud de prueba

Componente Tecnología FileCatalyst Producto
API del cliente Java, C ++ *, * iOS, Android *, * .NET Directa, flujo de trabajo
Los applets de Java, JavaScript API Cualquier navegador web reciente con el Java Plug-in Directo
Administración remota Java, REST Directa, flujo de trabajo
CLI / Shell Scripting Línea de comando* Directa, flujo de trabajo
C ++ API / CLI No Java-Line & API Comando Directo

* Traslado hacia y desde el flujo de trabajo y sólo Webmail Áreas de archivo.

El kit de desarrollo es la base de nuestros productos; si usted es dueño de cualquier producto de calificación, el kit de desarrollo puede ser licencia como un add-on. Para el desarrollo autónomo, el SDK se añade típicamente a FileCatalyst directa; sin embargo, algunos componentes están diseñados para interactuar con FileCatalyst de flujo de trabajo.

Reloj SDK Webinar

Download accompanying ejemplo de código fuente aquí

API del cliente

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.

La API de cliente también le permite enviar mediante programación trabajos y archivos de flujo de trabajo FileCatalyst o Webmail.

importar unlimited.fc.client.api. *; import java.io. *; UploadSample public class {void Main (args String []) public static lanza la excepción {FCClient fc = new FCClient ( "192.168.1.30", 21); fc.setShowConsoleLog (true); fc.initialize (); fc.connect (); fc.login ( "anónimo", "me@email.com"); fc.setMode (TransferMode.UDP); // Establecer la velocidad de inicio y tasa objetivo a la misma. Que se ralentizará si la congestión encontró. fc.setStartRate (10000); fc.setTargetRate (10000); fc.setVerifyIntegrity (true); TransferHook carga = fc.upload (nuevo archivo ( "c: /temp/500MB.zip")); while (! upload.isTransferComplete ()) {// podría mostrar alguna información de progreso aquí usando los diversos métodos en el objeto // si TransferHook (upload.getStatusCode () == upload.TRANSFERRING) {System.out.println (carga .getPercent () + "% "+ upload.getRate () +" Kbps"); } Try {Thread.sleep (1000); } Catch (InterruptedException ex) {}} // desconectarse del servidor fc.disconnect (); // limpiar 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();
  }
}

API del servidor

El servidor Java y las API REST exponen todos los métodos necesarios para gestionar usuarios y sesión de solicitud de información de la FileCatalyst servidor.

// 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");
}

API móviles

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.

Construido usando la API móvil, nuestra aplicación FileCatalyst ya está disponible para Androide
y 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 API del cliente sample.

HotFolder API REST

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

 

TransferAgent JavaScript y 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.

 

El centro de la API REST

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).

 

Flujo de trabajo API REST

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

  • Añadir / editar / borrar usuarios
  • Añadir / editar / borrar Grupos
  • Añadir / Editar / Eliminar Los formularios de pedido
  • Agregar sitios / editar / borrar FTP
  • Lista de campos de empleo

.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.

clic para ver la muestra de pantalla

Interfaz de línea de comando

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.

Biblioteca cliente nativo de C ++

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 de 32 bits
    • Windows de 64 bits


  • Linux de 64 bits (.deb)
  • Linux de 64 bits (.rpm)
  • Linux ARM 7 de 32 bits (.deb)
  • Linux ARM 7 de 32 bits (.rpm)
  • OSX 64 bits

Si necesita un puerto para una plataforma específica, póngase en contacto con nosotros con los detalles.

solicitud de prueba