no.ntnu.item.router.utilities
Class PostInfoHandler
java.lang.Object
no.ntnu.item.router.utilities.PostInfoHandler
- All Implemented Interfaces:
- com.sun.net.httpserver.HttpHandler
class PostInfoHandler
- extends java.lang.Object
- implements com.sun.net.httpserver.HttpHandler
This is a HttpHandler
for the reception of HTTP POST messages.
The POST messages are sent from the Silverlight clients behind the router
The messages are read and passed on to the ServiceSessionBank
After processing the incoming request, a response is constructed and sent.
- Author:
- Kristian Haugene
Method Summary |
private java.lang.Integer |
getUserTargetRate(java.lang.String clientId)
This method will retrieve the user target rate if set |
void |
handle(com.sun.net.httpserver.HttpExchange t)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serviceBank
private ServiceSessionBank serviceBank
- The
ServiceSessionBank
object to report measurements to
PostInfoHandler
public PostInfoHandler(ServiceSessionBank serviceBank)
- Constructor
- Parameters:
serviceBank
-
handle
public void handle(com.sun.net.httpserver.HttpExchange t)
throws java.io.IOException
- Specified by:
handle
in interface com.sun.net.httpserver.HttpHandler
- Throws:
java.io.IOException
getUserTargetRate
private java.lang.Integer getUserTargetRate(java.lang.String clientId)
- This method will retrieve the user target rate if set
- Parameters:
clientId
- identifying the session to retireve rate from
- Returns:
- the target rate as integer, null if rate is not set