Class TextRequestHandler

  • All Implemented Interfaces:
    IRequestHandler

    public class TextRequestHandler
    extends java.lang.Object
    implements IRequestHandler
    Request target that responds by sending its string property.
    Author:
    igor.vaynberg, Eelco Hillenius
    • Constructor Summary

      Constructors 
      Constructor Description
      TextRequestHandler​(java.lang.String string)
      Creates a string request target with content type text/plain and default charset (usually UTF-8)
      TextRequestHandler​(java.lang.String contentType, java.lang.String encoding, java.lang.String string)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getString()
      Gets the string property.
      void respond​(IRequestCycle requestCycle)
      Responds by sending the string property.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextRequestHandler

        public TextRequestHandler​(java.lang.String string)
        Creates a string request target with content type text/plain and default charset (usually UTF-8)
        Parameters:
        string - the string for the response
      • TextRequestHandler

        public TextRequestHandler​(java.lang.String contentType,
                                  java.lang.String encoding,
                                  java.lang.String string)
        Constructor
        Parameters:
        contentType - content type of the data the string represents, e.g. text/html; charset=utf-8
        encoding - charset to use
        string - string for the response