Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jac.aspects.gui.web
Class AbstractJacRequest  view AbstractJacRequest download AbstractJacRequest.java

java.lang.Object
  extended byjac.aspects.gui.web.AbstractJacRequest
All Implemented Interfaces:
JacRequest
Direct Known Subclasses:
MultiMapJacRequest, MultiPartJacRequest

public abstract class AbstractJacRequest
extends java.lang.Object
implements JacRequest

This class represents a multi-part HttpRequest.


Field Summary
protected static long DEFAULT_REQUEST_TIMEOUT
           
(package private)  java.util.Map headers
           
(package private)  JacRequest parent
           
protected  jac.util.Semaphore semaphore
          The semaphore that blocks the requesting thread until the response is available.
 
Constructor Summary
AbstractJacRequest(javax.servlet.http.HttpServletRequest servletRequest)
           
 
Method Summary
 java.lang.String getHeader(java.lang.String name)
          Gets the value of a header.
abstract  java.lang.Object getParameter(java.lang.String name)
          Returns a parameter.
 java.lang.String getUserAgent()
          Returns the user agent of this request
 boolean isIEUserAgent()
          Tells if the user agent of the request is Internet Explorer
 void setParent(JacRequest parent)
           
 void setResponse()
          Unblock a thread that was blocked by a waitForResult call.
 boolean waitForResponse()
          Makes the current requesting thread block and wait until the response is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

headers

java.util.Map headers

parent

JacRequest parent

semaphore

protected transient jac.util.Semaphore semaphore
The semaphore that blocks the requesting thread until the response is available.


DEFAULT_REQUEST_TIMEOUT

protected static final long DEFAULT_REQUEST_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

AbstractJacRequest

public AbstractJacRequest(javax.servlet.http.HttpServletRequest servletRequest)
Method Detail

getParameter

public abstract java.lang.Object getParameter(java.lang.String name)
Description copied from interface: JacRequest
Returns a parameter. The result can be a String or a FileParameter object.

Specified by:
getParameter in interface JacRequest

isIEUserAgent

public boolean isIEUserAgent()
Description copied from interface: JacRequest
Tells if the user agent of the request is Internet Explorer

Specified by:
isIEUserAgent in interface JacRequest

getUserAgent

public java.lang.String getUserAgent()
Description copied from interface: JacRequest
Returns the user agent of this request

Specified by:
getUserAgent in interface JacRequest

getHeader

public java.lang.String getHeader(java.lang.String name)
Description copied from interface: JacRequest
Gets the value of a header.

Specified by:
getHeader in interface JacRequest

setParent

public void setParent(JacRequest parent)

waitForResponse

public boolean waitForResponse()
Description copied from interface: JacRequest
Makes the current requesting thread block and wait until the response is available.

The thread that call this method waits until a call to setResponse occurs or a timeout occurs.

Specified by:
waitForResponse in interface JacRequest

setResponse

public void setResponse()
Description copied from interface: JacRequest
Unblock a thread that was blocked by a waitForResult call.

Specified by:
setResponse in interface JacRequest