|
|
|
|||||
|
File transfer and threading.
Hello! i'm currently working on implementing a servlet that let's me take files from him. I need to be able to send the file from the servlet in a second thread, because if two clients ask me for differents files i want to be able to procces incoming messages while uploading the file. Will this interface suit my need? What else should i take in mind when implementing this?
Thank you! Code:
sequence<byte> ByteSeq;
interface FileProvider
{
// To read a buffer from a provider file
["ami"] nonmutating ByteSeq getFile(string path, int pos, int num);
}
__________________
Emmanuel Oga Q4 Technologies Argentina (www.q4tech.com) Q4Social Network (Internal lan messenger/file transfer app) |
|
|||||
|
In fact having read the documentation again, i think waht i need is amd... but i'm worry about don't getting the right meaning for each term (amd, ami).
What i need is a responsible GUI while i transfer file from my servlet, and i need to be able to respond to other method calls while transfering the file too. My application scheme is like this: Code:
module Q4MusicServer
{
sequence <Q4MusicClient::Mp3Client*> ClientList;
interface Mp3Server
{
// Add a client to the queue
idempotent void RegisterClient(Q4MusicClient::Mp3Client* c, out bool bSuccess);
// Remove a client from the queue
idempotent void UnregisterClient(Q4MusicClient::Mp3Client* c);
// Send a message to a client.
nonmutating SendMessage(string message);
};
};
Code:
module Q4MusicClient
{
sequence<byte> ByteSeq;
interface Mp3Client
{
nonmutating bool HasFile(string fileName);
["ami"] nonmutating ByteSeq getFile(string path, int pos, int num);
// Gets the name of the mp3 that the client want to play
nonmutating string GetCurrentMp3Name();
nonmutating SendMessage(string message);
// if the server is shut-down, first it tries to disconnect the clients
idempotent void Disconnect();
};
};
In the client, in the other side, i need to procces the response to the getFile and, maybe, at the same time, respond to other methods (like server sending me a message using SendMessage), and i need to keep the GUI responsive too. For this reasons, i think i should use AMD on the Mp3Client instead of AMI. What do you think??? Thank you very much!
__________________
Emmanuel Oga Q4 Technologies Argentina (www.q4tech.com) Q4Social Network (Internal lan messenger/file transfer app) |
|
||||||
|
I'm afraid your questions go beyond the free support we can offer here in these forums. In essence, you are asking for help with the design of your particular application. We can offer this as consulting services to your company. If you are interested, please contact us at info@zeroc.com.
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Program implementation / File Transfer Questions (yes, i have read the faq :) )/ Ruby | EmmanuelOga | Help Center | 2 | 08-01-2006 06:58 PM |
| Any Example that do file transfer out there | alexm | Help Center | 2 | 04-06-2006 06:31 PM |
| How can I develop a File transfer application?question 1 | xiehua | Help Center | 11 | 12-05-2003 11:39 PM |
| How can I develop a File transfer application?question 2.1 | xiehua | Help Center | 2 | 11-21-2003 08:46 AM |
| How can I develop a File transfer application?question 2 | xiehua | Help Center | 4 | 11-20-2003 11:33 AM |