|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Client
Client API for communicating with aServer.
| Method Summary | |
|---|---|
RemoteCall |
callRemote()
If callers want to make a method call to an server. |
void |
connect(java.net.InetSocketAddress address)
Used to build up a connection to a server. |
void |
connect(java.net.InetSocketAddress address,
java.net.InetSocketAddress proxy,
java.lang.String userAgent,
java.lang.String userName,
java.lang.String pass)
Used to build up a connection to a server over an proxy. |
java.io.OutputStream |
getOutputStream()
|
void |
onMessageError(java.lang.String errorMsg)
Gets called if some protocol sepecific error happens. |
void |
service(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
An client can also be called by an server. |
void |
setIoExceptionHandler(IOExceptionHandler ioExceptionHandler)
|
void |
start()
Setup and starts the client |
void |
stop()
Stops client |
| Method Detail |
|---|
RemoteCall callRemote()
throws java.io.IOException
OutputStream for writing
to server and an InputStream for getting the servers's reply
java.io.IOExceptionjava.io.OutputStream getOutputStream()
void service(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
inputStream - containing the server bytesoutputStream - client can reply to server's messagevoid onMessageError(java.lang.String errorMsg)
errorMsg -
void connect(java.net.InetSocketAddress address)
throws java.io.IOException
start() must have been called before.
address - server address
java.io.IOException
void connect(java.net.InetSocketAddress address,
java.net.InetSocketAddress proxy,
java.lang.String userAgent,
java.lang.String userName,
java.lang.String pass)
throws java.io.IOException
start() must have been called before.
address - server addressproxy - addressuserAgent - proxy agent identifieruserName - if proxy needs authentification (otherwise null)pass - if proxy needs authentification (otherwise null)
java.io.IOException
void start()
throws java.lang.Exception
java.lang.Exception
void stop()
throws java.lang.Exception
java.lang.Exceptionvoid setIoExceptionHandler(IOExceptionHandler ioExceptionHandler)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||