|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PaP.Actor | +--PaP.ApplicationActor | +--FileTransfer.v1_1.FTClient
FTClient is the actor used in the FileTransfer application. It receives requests from other FTClients and sends requests based on the interaction between the user and the FTClientWindow. The ApplicationMessages sent are of one of the predefined types. The fileinfo property contains information about the current filetransfer.
Inner Class Summary | |
class |
FTClient.CloseWindowThread
This thread is started when an ActorPlugOut request is received. |
Field Summary | |
private java.lang.String |
CANCEL_FILE_TRANSFER
|
private java.lang.String |
FILE_TRANSFER
|
private java.lang.String |
FILE_TRANSFER_FINISHED
|
private java.lang.String |
FILE_TRANSFER_REJECT
|
private java.lang.String |
FILE_TRANSFER_REQUEST
|
private java.util.ArrayList |
fileInfo
ArrayList with information about the current filetransfer. |
private RoleSession |
fileTransferRoleSession
The rolesession used for filetransfer. |
private boolean |
initiated
Indicates wether initial ActorPlugIn has been performed or not |
private java.lang.String |
RESUME_FILE_TRANSFER
|
private FTClientWindow |
window
Reference to the GUI |
Fields inherited from class PaP.Actor |
bf, context, fh |
Constructor Summary | |
FTClient()
Creates a new filetransfer client. |
Method Summary | |
RequestResult |
applicationActorEntry(RequestPars rpars)
This method is the common entry point for all external requests to this actor. |
void |
cancelFileTransfer()
Sends a message to another FTClient via the fileTransferRoleSession notifying him that the current filetransfer has been cancelled by this FTClient. |
void |
closeApplication()
This method is used by the FTClientWindow to notify that the user wants to close the application. |
void |
dbg(java.lang.String dbg)
Sends debug information to this actor's BaseFrame window, which is an interactive debug client window for several entities. |
void |
sendFileTransferFinished()
Sends a message to another FTClient via the fileTransferRoleSession notifying him that the current filetransfer is finished. |
boolean |
sendFileTransferRequest(java.lang.String ftclient,
java.lang.String filename,
long filesize)
Sends a request to the specified FTClient asking him if he wants to receive the specified file. |
void |
setFileInfo(java.util.ArrayList fi)
Sets the current fileInfo. |
void |
transferBytes(byte[] bytes)
Sends part of a file to another FTClient in the form of a byte array. |
Methods inherited from class PaP.Actor |
findRoleSession, getGAI, start, status, term |
Methods inherited from class java.lang.Object |
|
Field Detail |
private final java.lang.String FILE_TRANSFER_REQUEST
private final java.lang.String FILE_TRANSFER_REJECT
private final java.lang.String FILE_TRANSFER
private final java.lang.String FILE_TRANSFER_FINISHED
private final java.lang.String RESUME_FILE_TRANSFER
private final java.lang.String CANCEL_FILE_TRANSFER
private boolean initiated
private RoleSession fileTransferRoleSession
private FTClientWindow window
private java.util.ArrayList fileInfo
Constructor Detail |
public FTClient()
Method Detail |
public RequestResult applicationActorEntry(RequestPars rpars) throws java.lang.Exception
applicationActorEntry
in class ApplicationActor
rpars
- Instance of RequestPars which specifies type of request and
additional parametres to the request.java.lang.Exception
- public void cancelFileTransfer() throws java.lang.Exception
public void closeApplication() throws java.lang.Exception
public void dbg(java.lang.String dbg)
dbg
in class ApplicationActor
dbg
- The debug information to be sent.public void sendFileTransferFinished() throws java.lang.Exception
public boolean sendFileTransferRequest(java.lang.String ftclient, java.lang.String filename, long filesize) throws java.lang.Exception
ftclient
- The GAI of the FTClient the request is sent to.filename
- The name of the file being transferred.filesize
- The size of the file being transferred.public void setFileInfo(java.util.ArrayList fi)
fi
- The ArrayList with information about the current filetransfer.public void transferBytes(byte[] bytes) throws java.lang.Exception
bytes
- Byte array which constitutes the part of the file transferred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |