trait HLet extends AnyRef
Handles an HTTP request and makes some computation that wil eventually termintate .
- Source
 - HLet.scala
 
- Alphabetic
 - By Inheritance
 
- HLet
 - AnyRef
 - Any
 
- Hide All
 - Show All
 
- Public
 - All
 
Abstract Value Members
- 
      
      
      
        
      
    
      
        abstract 
        def
      
      
        aact(talk: HTalk): Future[Any]
      
      
      
This method contains the actual (suspendable) computation.
This method contains the actual (suspendable) computation. The given
talkparameter contains the methods to access the request and session data, as well as the method to send the response to the client. This method is called asynchronously (hence the nameaact)- See also
 
 
Concrete Value Members
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        !=(arg0: Any): Boolean
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        ##(): Int
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        ==(arg0: Any): Boolean
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        asInstanceOf[T0]: T0
      
      
      
- Definition Classes
 - Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        clone(): AnyRef
      
      
      
- Attributes
 - protected[lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... ) @native()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        e404(tk: HTalk): Unit
      
      
      
Answers with an 404 error message.
Answers with an 404 error message.
- Attributes
 - protected
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        eq(arg0: AnyRef): Boolean
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        equals(arg0: Any): Boolean
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        err(status: HStatus.Value, tk: HTalk): Unit
      
      
      
Answers with an error response with the given code.
Answers with an error response with the given code.
- Attributes
 - protected
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        err(status: HStatus.Value, msg: String, tk: HTalk): Unit
      
      
      
Answers with an error response with the given code and message.
Answers with an error response with the given code and message.
- Attributes
 - protected
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        finalize(): Unit
      
      
      
- Attributes
 - protected[lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws( classOf[java.lang.Throwable] )
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        getClass(): Class[_]
      
      
      
- Definition Classes
 - AnyRef → Any
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        hashCode(): Int
      
      
      
- Definition Classes
 - AnyRef → Any
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        isInstanceOf[T0]: Boolean
      
      
      
- Definition Classes
 - Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        ne(arg0: AnyRef): Boolean
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        notify(): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        notifyAll(): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @native()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        partsAcceptor(reqInfo: HReqHeaderData): Option[HPartsAcceptor]
      
      
      
When this
HLetaccepts multipart requests, this method must return a parts acceptor that will process the different parts.When this
HLetaccepts multipart requests, this method must return a parts acceptor that will process the different parts. An example of part acceptor is:class ImageUpload extends HSimpleLet { class ImagePartsAcceptor(reqInfo: HReqHeaderData) extends HPartsAcceptor(reqInfo) { // the parts are stored in a byte array output stream private var input: ByteArrayOutputStream = _ // accept only uploaded image files def open(desc: HPartDescriptor) = reqInfo.header("Content-Type") match { case Some(mime) if mime.startsWith("image/") => input = new ByteArrayOutputStream true case _ => false } def accept(bytes: Array[Byte]) = { // write part into the buffer input.write(bytes) // accept more parts true } def close { // save the bytes containing the image image = Some(input.toByteArray) // close the output stream input.close input = null } def declineAll { input = null } } private var image: Option[Array[Byte]] = None def act(talk: HTalk) = { val response = image match { case Some(img) => "Image uploaded" case None => "Not uploaded Image" } talk.setContentLength(response.length).write(response) } }
 - 
      
      
      
        
      
    
      
        
        def
      
      
        redirect(uriPath: String, tk: HTalk): Unit
      
      
      
Redirects the client to the given URI.
Redirects the client to the given URI.
- Attributes
 - protected
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        sessRedirect(uriPath: String, tk: HTalk): Unit
      
      
      
Redirects the client to the given URI and adds the sessions ID to the URI parameters.
Redirects the client to the given URI and adds the sessions ID to the URI parameters.
- Attributes
 - protected
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        synchronized[T0](arg0: ⇒ T0): T0
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        toString(): String
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... )
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long, arg1: Int): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... )
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        wait(arg0: Long): Unit
      
      
      
- Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... ) @native()