|
||||||||||
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(InetSocketAddress address)
Used to build up a connection to a server. |
void |
connect(InetSocketAddress address,
InetSocketAddress proxy,
String userAgent,
String userName,
String pass)
Used to build up a connection to a server over an proxy. |
OutputStream |
getOutputStream()
|
void |
onMessageError(String errorMsg)
Gets called if some protocol sepecific error happens. |
void |
service(InputStream inputStream,
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 IOException
OutputStream
for writing
to server and an InputStream for getting the servers's reply
IOException
OutputStream getOutputStream()
void service(InputStream inputStream, OutputStream outputStream)
inputStream
- containing the server bytesoutputStream
- client can reply to server's messagevoid onMessageError(String errorMsg)
errorMsg
- void connect(InetSocketAddress address) throws IOException
start()
must have been called before.
address
- server address
IOException
void connect(InetSocketAddress address, InetSocketAddress proxy, String userAgent, String userName, String pass) throws 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)
IOException
void start() throws Exception
Exception
void stop() throws Exception
Exception
void setIoExceptionHandler(IOExceptionHandler ioExceptionHandler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |