public final class ServerSession extends ObexSession implements Runnable
mAuthenticator, mChallengeDigest
Constructor and Description |
---|
ServerSession(ObexTransport trans,
ServerRequestHandler handler,
Authenticator auth)
Creates new ServerSession.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the server session - in detail close I/O streams and the
underlying transport layer.
|
void |
run()
Processes requests made to the server and forwards them to the
appropriate event listener.
|
void |
sendResponse(int code,
byte[] header)
Send standard response.
|
handleAuthChall, handleAuthResp
public ServerSession(ObexTransport trans, ServerRequestHandler handler, Authenticator auth) throws IOException
trans
- the connection to the clienthandler
- the event listener that will process requestsauth
- the authenticator to use with this connectionIOException
- if an error occurred while opening the input and
output streamspublic void run()
public void sendResponse(int code, byte[] header) throws IOException
code
- the response code to sendheader
- the headers to include in the responseIOException
- if an IO error occurspublic void close()