Package net.targetr.rc.client
Class ClientRequest
java.lang.Object
net.targetr.rc.client.ClientRequest
Identifies a browser connection and tracks its lifetime.
- Author:
- Dr Michael Gardiner
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe app the client is running.final StringThe browser's client ID, reused when reconnecting.The underlying connection object.longRequest end time inClock.realtime()milliseconds, or 0 while active.final StringThe IP address of the client connection.final StringThe room the client is in.final longRequest start time inClock.realtime()milliseconds.final StringThe User-Agent string from the client. -
Constructor Summary
ConstructorsConstructorDescriptionClientRequest(HttpRequest httpReq) Parses a client request from an incoming HTTP request. -
Method Summary
-
Field Details
-
ip
The IP address of the client connection. -
userAgent
The User-Agent string from the client. -
roomId
The room the client is in. -
app
The app the client is running. -
clientId
The browser's client ID, reused when reconnecting. -
startTime
public final long startTimeRequest start time inClock.realtime()milliseconds. -
endTime
public volatile long endTimeRequest end time inClock.realtime()milliseconds, or 0 while active. -
connection
The underlying connection object.
-
-
Constructor Details
-
ClientRequest
Parses a client request from an incoming HTTP request.- Parameters:
httpReq- the HTTP request- Throws:
IOException- if the request parameters are invalid
-