com.myJava.file.driver.remote
Class AbstractProxy

java.lang.Object
  extended by com.myJava.file.driver.remote.AbstractProxy
Direct Known Subclasses:
FTPProxy

public abstract class AbstractProxy
extends java.lang.Object


Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Field Summary
protected  long connectionId
           
protected  RemoteDebug debug
           
protected  RemoteFileInfoCache fileInfoCache
           
protected  long lastOpTime
           
protected  double nbCacheRetrieval
           
protected  double nbGetRemoteFileInfos
           
protected  java.lang.String ownerId
           
protected  long uid
           
 
Constructor Summary
AbstractProxy()
           
 
Method Summary
 boolean acquireLock(java.lang.String owner)
           
protected  void checkLocked()
           
protected  void clearCache()
           
abstract  AbstractProxy cloneProxy()
           
abstract  void completePendingCommand(boolean blocking)
           
 boolean createNewFile(java.lang.String remoteFile)
           
 void debug(java.lang.String message)
           
 void debug(java.lang.String message, java.lang.Object arg)
           
abstract  boolean deleteDir(java.lang.String remoteDir)
           
abstract  boolean deleteFile(java.lang.String remoteFile)
           
abstract  void disconnect()
           
 void flush()
           
 long getConnectionId()
           
abstract  java.io.InputStream getFileInputStream(java.lang.String file)
           
 java.io.OutputStream getFileOutputStream(java.lang.String file)
           
abstract  java.io.OutputStream getFileOutputStream(java.lang.String file, boolean append)
           
 java.lang.String getOwnerId()
           
abstract  FictiveFile getRemoteFileInfos(java.lang.String remoteFile)
           
 boolean hasReconnectSince(long lastConnectionId)
           
 void initFictiveLocalFile(FictiveFile file)
           
abstract  FictiveFile[] listFiles(java.lang.String parentFile)
           
abstract  boolean mkdir(java.lang.String remoteFile)
           
protected  void registerFileInfo(java.lang.String remoteFileName, FictiveFile info)
           
 void releaseLock(java.lang.String owner)
           
 void removeCachedFileInfos(java.lang.String fileName)
           
abstract  boolean renameTo(java.lang.String source, java.lang.String destination)
           
protected abstract  void resetClient(java.lang.Throwable e)
           
protected abstract  void resetContextData()
           
 void setFileInfoCache(RemoteFileInfoCache fileInfoCache)
           
protected  void updateOpTime()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uid

protected final long uid

debug

protected RemoteDebug debug

nbGetRemoteFileInfos

protected double nbGetRemoteFileInfos

nbCacheRetrieval

protected double nbCacheRetrieval

connectionId

protected long connectionId

ownerId

protected java.lang.String ownerId

lastOpTime

protected long lastOpTime

fileInfoCache

protected RemoteFileInfoCache fileInfoCache
Constructor Detail

AbstractProxy

public AbstractProxy()
Method Detail

listFiles

public abstract FictiveFile[] listFiles(java.lang.String parentFile)
                                 throws RemoteConnectionException
Throws:
RemoteConnectionException

getFileInputStream

public abstract java.io.InputStream getFileInputStream(java.lang.String file)
                                                throws RemoteConnectionException
Throws:
RemoteConnectionException

renameTo

public abstract boolean renameTo(java.lang.String source,
                                 java.lang.String destination)
                          throws RemoteConnectionException
Throws:
RemoteConnectionException

mkdir

public abstract boolean mkdir(java.lang.String remoteFile)
                       throws RemoteConnectionException
Throws:
RemoteConnectionException

completePendingCommand

public abstract void completePendingCommand(boolean blocking)
                                     throws java.io.IOException,
                                            RemoteConnectionException
Throws:
java.io.IOException
RemoteConnectionException

resetContextData

protected abstract void resetContextData()

resetClient

protected abstract void resetClient(java.lang.Throwable e)

disconnect

public abstract void disconnect()

deleteFile

public abstract boolean deleteFile(java.lang.String remoteFile)
                            throws RemoteConnectionException
Throws:
RemoteConnectionException

deleteDir

public abstract boolean deleteDir(java.lang.String remoteDir)
                           throws RemoteConnectionException
Throws:
RemoteConnectionException

cloneProxy

public abstract AbstractProxy cloneProxy()

getRemoteFileInfos

public abstract FictiveFile getRemoteFileInfos(java.lang.String remoteFile)
                                        throws RemoteConnectionException
Throws:
RemoteConnectionException

getFileOutputStream

public abstract java.io.OutputStream getFileOutputStream(java.lang.String file,
                                                         boolean append)
                                                  throws RemoteConnectionException
Throws:
RemoteConnectionException

flush

public void flush()

setFileInfoCache

public void setFileInfoCache(RemoteFileInfoCache fileInfoCache)

debug

public void debug(java.lang.String message,
                  java.lang.Object arg)

debug

public void debug(java.lang.String message)

getConnectionId

public long getConnectionId()

getOwnerId

public java.lang.String getOwnerId()

acquireLock

public boolean acquireLock(java.lang.String owner)

releaseLock

public void releaseLock(java.lang.String owner)

checkLocked

protected void checkLocked()

hasReconnectSince

public boolean hasReconnectSince(long lastConnectionId)

updateOpTime

protected void updateOpTime()

removeCachedFileInfos

public void removeCachedFileInfos(java.lang.String fileName)

clearCache

protected void clearCache()

registerFileInfo

protected void registerFileInfo(java.lang.String remoteFileName,
                                FictiveFile info)

createNewFile

public boolean createNewFile(java.lang.String remoteFile)
                      throws RemoteConnectionException
Throws:
RemoteConnectionException

initFictiveLocalFile

public void initFictiveLocalFile(FictiveFile file)

getFileOutputStream

public java.io.OutputStream getFileOutputStream(java.lang.String file)
                                         throws RemoteConnectionException
Throws:
RemoteConnectionException