jason.service.http1_0
Class HostHandling

java.lang.Object
  |
  +--jason.core.pool.AbstractTask
        |
        +--jason.core.pool.SocketTask
              |
              +--jason.service.http1_0.HostHandling
All Implemented Interfaces:
IntHttpCode, Task

public class HostHandling
extends SocketTask
implements IntHttpCode

Core for the HTTP handling. When a client send a request, this is received by the HTTPService that root it in this class that sends a valid response depending on the HTTP 1.0 protocol.

A dispatch depends on the protocol. If HTTP is found, a part try to send the appropriate document using cache if enabled.

Version 1.1 : This version is adapted to the new framework

Since:
1.0
See Also:
Runnable

Field Summary
 
Fields inherited from class jason.core.pool.SocketTask
socket
 
Fields inherited from interface jason.service.http1_0.framework.IntHttpCode
CO_BAD_REQUEST, CO_INTERNAL_SERVER_ERROR, CO_NOT_FOUND, CO_NOT_IMPLEMENTED, CO_OK
 
Constructor Summary
HostHandling(Service service, java.net.Socket sck, ComponentFactory config)
           
 
Method Summary
 void run()
          User must override this method and inserts its handling code
 void setConfig(ComponentFactory config)
           
 
Methods inherited from class jason.core.pool.SocketTask
getSocket, runTask
 
Methods inherited from class jason.core.pool.AbstractTask
getTaskContext, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostHandling

public HostHandling(Service service,
                    java.net.Socket sck,
                    ComponentFactory config)
             throws ServiceException
Method Detail

setConfig

public void setConfig(ComponentFactory config)

run

public void run()
Description copied from class: SocketTask
User must override this method and inserts its handling code

Overrides:
run in class SocketTask