|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.opensync.engine.server.DefaultProtocol
The default implementation of the protocol interface
| Field Summary | |
protected Connector |
connector
The connector used by the protocol to get information to connect to the source |
protected java.lang.String |
folder
The folder use by the protocol to get and put files |
protected java.lang.String |
name
The name of the protocol (eg: win_file, ftp, ...) |
protected boolean |
removeFile
The file must be rename when cleaned |
protected boolean |
renameFile
The file must be rename when cleaned |
| Fields inherited from interface org.opensync.engine.server.Protocol |
FTP, WIN_FILE |
| Constructor Summary | |
DefaultProtocol()
Construct a DefaultProtocol |
|
| Method Summary | |
void |
clean(java.lang.String fileName)
Clean files (rename or remove files when finished) |
Connector |
getConnector()
Get the connector used by the protocol to get information to connect to the source |
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 |
void |
init()
|
boolean |
isRemoveFile()
The file must be remove when clean |
boolean |
isRenameFile()
The file must be rename when clean |
void |
setConnector(Connector connector)
Set the connector used by the protocol to get information to connect to the source |
void |
setFolder(java.lang.String folder)
Set the folder use by the protocol to get and put files |
void |
setName(java.lang.String name)
Set the name of the protocol (eg: win_file, ftp, ...) |
void |
setRemoveFile(boolean removeFile)
The file must be remove when clean |
void |
setRenameFile(boolean renameFile)
The file must be rename when clean |
java.lang.String |
toString()
Used only for debugging |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opensync.engine.server.Protocol |
getViews, putView |
| Field Detail |
protected java.lang.String name
protected java.lang.String folder
protected Connector connector
protected boolean renameFile
protected boolean removeFile
| Constructor Detail |
public DefaultProtocol()
| Method Detail |
public void setName(java.lang.String name)
name - the name of the protocolpublic java.lang.String getName()
getName in interface Protocolpublic void setFolder(java.lang.String folder)
folder - the folder of the protocolpublic java.lang.String getFolder()
getFolder in interface Protocolpublic void setConnector(Connector connector)
connector - the connector of the protocolConnectorpublic Connector getConnector()
public void init()
init in interface ProtocolOpenSyncException
java.io.IOException
public void clean(java.lang.String fileName)
throws OpenSyncException,
java.io.IOException
clean in interface ProtocolfileName - the file name
OpenSyncException
java.io.IOExceptionpublic void setRenameFile(boolean renameFile)
renameFile - public boolean isRenameFile()
public void setRemoveFile(boolean removeFile)
removeFile - public boolean isRemoveFile()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||