swpchat.protocol
Interface FileServer
- All Known Implementing Classes:
- FileProtocolHandler
- public interface FileServer
Interface for the Receiver(Client) as server for another client.
These methods ar used and must be implemented.
Method Summary |
void |
serve(java.net.Socket socket)
Method serve is used to serve a sender(Client). |
serve
public void serve(java.net.Socket socket)
throws TimeoutException,
java.io.IOException,
java.security.InvalidParameterException
- Method serve is used to serve a sender(Client).
- Parameters:
{@link
- java.net.Socket}, the socket that must be served{@link
- java.io.InputStream}, the Stream that must be read from- Throws:
TimeoutException
- thrown if connection to the client
is lost or too slow.java.io.IOException
- thrown for any I/O error.java.security.InvalidParameterException
- possibly useful