|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oodt.cas.pushpull.protocol.Protocol
public abstract class Protocol
Protocol Interface Class
.| Field Summary | |
|---|---|
protected String |
protocolType
|
protected RemoteSite |
remoteSite
|
| Constructor Summary | |
|---|---|
protected |
Protocol(String protocolType)
|
| Method Summary | |
|---|---|
abstract void |
abortCurFileTransfer()
|
void |
cd(ProtocolFile file)
Changes directories to the given directory passed in (insures that the correct path goes to the cd(String) method implemented by inheriting classes |
void |
cdToHOME()
|
protected abstract void |
cdToRoot()
|
void |
cdToROOT()
|
protected abstract void |
chDir(ProtocolPath path)
|
void |
connect(RemoteSite remoteSite)
Connects the Protocol to the given server |
protected abstract void |
connect(String host,
String username,
String password)
|
boolean |
delete(ProtocolFile file)
|
protected abstract boolean |
deleteFile(ProtocolFile file)
|
void |
disconnect()
|
protected abstract void |
disconnectFromServer()
Disconnects the Protocol for the server |
void |
download(ProtocolFile file,
File toLocalFile)
|
void |
download(ProtocolFile file,
File toLocalFile,
long timeout)
|
boolean |
equals(Object protocol)
Overrides the Object class equals method. |
protected String |
getAbsPathFor(String path)
|
protected abstract ProtocolFile |
getCurrentWorkingDir()
Returns a string value of current directory -- similar to U*ix pwd() |
protected abstract void |
getFile(ProtocolFile file,
File toLocalFile)
Downloads a file from Protocol server to the location specified by the java.io.File passed in. |
ProtocolFile |
getHomeDir()
|
ProtocolFile |
getProtocolFileFor(String file,
boolean isDir)
|
String |
getProtocolType()
|
RemoteSite |
getRemoteSite()
The name of the Protocol server host name |
protected abstract boolean |
isConnected()
Can be used to determine if Protocol is connected |
boolean |
isProtocolConnected()
|
protected abstract List<ProtocolFile> |
listFiles()
|
List<ProtocolFile> |
ls()
|
List<ProtocolFile> |
ls(ProtocolFile dir)
|
List<ProtocolFile> |
ls(ProtocolFileFilter filter)
|
ProtocolFile |
pwd()
|
protected void |
reconnect()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String protocolType
protected RemoteSite remoteSite
| Constructor Detail |
|---|
protected Protocol(String protocolType)
| Method Detail |
|---|
protected abstract void chDir(ProtocolPath path)
throws ProtocolException
ProtocolException
protected abstract void cdToRoot()
throws ProtocolException
ProtocolException
protected abstract void connect(String host,
String username,
String password)
throws ProtocolException
ProtocolException
protected abstract void disconnectFromServer()
throws ProtocolException
IOException - If error is encountered while disconnecting
ProtocolException
protected abstract boolean isConnected()
throws ProtocolException
ProtocolException
protected abstract void getFile(ProtocolFile file,
File toLocalFile)
throws ProtocolException
fileName,
can't be a path. User must first navigate to the directory which contains
the file and then can call this method.
fileName - The name of the file at Protocol serverlocalFileLocation - The name and location that file should be stored
RemoteCommunicationException - If an error is encountered while downloading file
ProtocolException
public abstract void abortCurFileTransfer()
throws ProtocolException
ProtocolException
protected abstract ProtocolFile getCurrentWorkingDir()
throws ProtocolException
RemoteCommunicationException - If an error is encountered while retreiving path
ProtocolException
protected abstract List<ProtocolFile> listFiles()
throws ProtocolException
ProtocolExceptionprotected abstract boolean deleteFile(ProtocolFile file)
public void connect(RemoteSite remoteSite)
throws ProtocolException
server - The URL to which the Protocol will be connected
RemoteConnectionException - If error is encountered while connecting to server
ProtocolException
protected void reconnect()
throws ProtocolException
ProtocolException
public boolean isProtocolConnected()
throws ProtocolException
ProtocolException
public void disconnect()
throws ProtocolException
ProtocolException
public void cd(ProtocolFile file)
throws ProtocolException
dir - The path of directory to change to, can be relative or
absolute
RemoteCommunicationException
ProtocolException
public void cdToHOME()
throws ProtocolException
ProtocolException
public void cdToROOT()
throws ProtocolException
ProtocolException
public ProtocolFile getProtocolFileFor(String file,
boolean isDir)
throws ProtocolException
ProtocolExceptionpublic boolean equals(Object protocol)
equals in class Objectprotocol - The comparing protocol
public void download(ProtocolFile file,
File toLocalFile)
throws ProtocolException
ProtocolException
public void download(ProtocolFile file,
File toLocalFile,
long timeout)
throws ProtocolException
ProtocolExceptionpublic boolean delete(ProtocolFile file)
public ProtocolFile pwd()
throws ProtocolException
ProtocolException
public List<ProtocolFile> ls(ProtocolFile dir)
throws ProtocolException
ProtocolException
public List<ProtocolFile> ls()
throws ProtocolException
ProtocolException
public List<ProtocolFile> ls(ProtocolFileFilter filter)
throws ProtocolException
ProtocolExceptionpublic String getProtocolType()
public RemoteSite getRemoteSite()
public ProtocolFile getHomeDir()
protected String getAbsPathFor(String path)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||