public class TasksQueueNode
extends java.lang.Object
Worker
thread. Two different types of works can be definded:
statusCode
is 0, it is a work to be processed by
Worker
thread.
statusCode
is not 0, the task is for sending
an error message to the client. The status code of the HTTP response
is given through the statusCode
attribute and the
reason phrase is given through the reashonPhrase
attribute. An the socket to send the data to the client is the
socket
attribute.
TasksQueue
Modifier and Type | Field and Description |
---|---|
(package private) HTTPRequest |
httpRequest |
(package private) JPIPRequestFields |
jpipRequestFields
Definition in
JPIPRequestFields . |
(package private) java.lang.String |
reasonPhrase
Is the reason phrase of the HTTP response.
|
(package private) java.net.Socket |
socket
Is the socket that will used to communicate with the client.
|
(package private) int |
statusCode
This attribute is used to identify the kind of work.
|
Constructor and Description |
---|
TasksQueueNode(java.net.Socket socket,
HTTPRequest httpRequest,
JPIPRequestFields jpipRequestFields)
Constructor.
|
TasksQueueNode(java.net.Socket socket,
int statusCode,
java.lang.String reasonPhrase)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
HTTPRequest |
getHttpRequestFields()
Returns the
httpRequest attribute. |
JPIPRequestFields |
getJpipRequestFields()
Returns the
jpipRequestFields attribute. |
java.lang.String |
getReasonPhrase()
Returns the
reasonPhrase attribute. |
java.net.Socket |
getSocket()
Returns the client socket.
|
int |
getStatusCode()
Returns the status code.
|
void |
list(java.io.PrintStream out)
Prints this Tasks Queue Node fields out to the specified output stream.
|
void |
reset()
Set attributes to its initial values.
|
java.lang.String |
toString()
For debugging purposes.
|
int statusCode
socket
,
httpRequest
, and jpipRequestFields
attributes are used.
reasonPhrase
attribute.
java.net.Socket socket
HTTPRequest httpRequest
statusCode
JPIPRequestFields jpipRequestFields
JPIPRequestFields
.java.lang.String reasonPhrase
statusCode
public TasksQueueNode(java.net.Socket socket, HTTPRequest httpRequest, JPIPRequestFields jpipRequestFields)
socket
- is the client socket.httpRequest
- jpipRequestFields
- public TasksQueueNode(java.net.Socket socket, int statusCode, java.lang.String reasonPhrase)
socket
- statusCode
- reasonPhrase
- public int getStatusCode()
statusCode
.public java.net.Socket getSocket()
public HTTPRequest getHttpRequestFields()
httpRequest
attribute.httpRequest
.public JPIPRequestFields getJpipRequestFields()
jpipRequestFields
attribute.jpipRequestFields
.public java.lang.String getReasonPhrase()
reasonPhrase
attribute.reasonPhrase
.public void reset()
public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)