CADI.Server.Core
Class TasksQueueNode

java.lang.Object
  extended by CADI.Server.Core.TasksQueueNode

public class TasksQueueNode
extends java.lang.Object

This is an auxiliary class used to save the tasks that will be done by a Worker thread. Two different types of works can be definded:

Version:
1.0 2008/02/21
Author:
Group on Interactive Coding of Images (GICI)
See Also:
TasksQueue

Field Summary
(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 Summary
TasksQueueNode(java.net.Socket socket, HTTPRequest httpRequest, JPIPRequestFields jpipRequestFields)
          Constructor.
TasksQueueNode(java.net.Socket socket, int statusCode, java.lang.String reasonPhrase)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

statusCode

int statusCode
This attribute is used to identify the kind of work. They are:


socket

java.net.Socket socket
Is the socket that will used to communicate with the client.


httpRequest

HTTPRequest httpRequest
See Also:
statusCode

jpipRequestFields

JPIPRequestFields jpipRequestFields
Definition in JPIPRequestFields.


reasonPhrase

java.lang.String reasonPhrase
Is the reason phrase of the HTTP response.

See Also:
statusCode
Constructor Detail

TasksQueueNode

public TasksQueueNode(java.net.Socket socket,
                      HTTPRequest httpRequest,
                      JPIPRequestFields jpipRequestFields)
Constructor.

Parameters:
socket - is the client socket.
httpRequest -
jpipRequestFields -

TasksQueueNode

public TasksQueueNode(java.net.Socket socket,
                      int statusCode,
                      java.lang.String reasonPhrase)
Constructor.

Parameters:
socket -
statusCode -
reasonPhrase -
Method Detail

getStatusCode

public int getStatusCode()
Returns the status code. See statusCode.

Returns:
the status code

getSocket

public java.net.Socket getSocket()
Returns the client socket.

Returns:
client socket

getHttpRequestFields

public HTTPRequest getHttpRequestFields()
Returns the httpRequest attribute.

Returns:
the httpRequest.

getJpipRequestFields

public JPIPRequestFields getJpipRequestFields()
Returns the jpipRequestFields attribute.

Returns:
the jpipRequestFields.

getReasonPhrase

public java.lang.String getReasonPhrase()
Returns the reasonPhrase attribute.

Returns:
the reasonPhrase.

reset

public void reset()
Set attributes to its initial values.


toString

public java.lang.String toString()
For debugging purposes.

Overrides:
toString in class java.lang.Object

list

public void list(java.io.PrintStream out)
Prints this Tasks Queue Node fields out to the specified output stream. This method is useful for debugging.

Parameters:
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)