org.opensync.engine.server
Interface Protocol

All Known Implementing Classes:
DefaultProtocol

public interface Protocol

The protocol interface represents the protocol used to get information from the source like the tcp,ftp,http,... protocols


Field Summary
static java.lang.String FTP
          The protocol use to get and put file by FTP
static java.lang.String WIN_FILE
          The protocol use to get and put file on a Windows network
 
Method Summary
 void clean(java.lang.String fileName)
          Clean files (rename or remove) if necessary after the synchronisation done.
 java.lang.String getFolder()
          Get the folder use by the protocol to get and put files
 java.lang.String getName()
          Get the name of the protocol
 java.lang.String[] getViews(java.lang.String fileName)
          Get the content of files fileName
 void init()
           
 void putView(java.lang.String fileContent, java.lang.String fileName)
          Put the fileContent in the file fileName int the folder directory
 

Field Detail

WIN_FILE

public static final java.lang.String WIN_FILE
The protocol use to get and put file on a Windows network

See Also:
Constant Field Values

FTP

public static final java.lang.String FTP
The protocol use to get and put file by FTP

See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Get the name of the protocol


getFolder

public java.lang.String getFolder()
Get the folder use by the protocol to get and put files


putView

public void putView(java.lang.String fileContent,
                    java.lang.String fileName)
             throws OpenSyncException,
                    java.io.IOException
Put the fileContent in the file fileName int the folder directory

Parameters:
fileContent - the file content
fileName - the file name
Throws:
OpenSyncException
java.io.IOException

getViews

public java.lang.String[] getViews(java.lang.String fileName)
                            throws OpenSyncException,
                                   java.io.IOException
Get the content of files fileName

Parameters:
fileName - the file name (may use *)
Throws:
OpenSyncException
java.io.IOException

init

public void init()
Throws:
OpenSyncException
java.io.IOException

clean

public void clean(java.lang.String fileName)
           throws OpenSyncException,
                  java.io.IOException
Clean files (rename or remove) if necessary after the synchronisation done.

Parameters:
fileName - the file name to clean
Throws:
OpenSyncException
java.io.IOException


Copyright © 2004 sourceforge. All Rights Reserved.