View Javadoc

1   /*
2    * @(#)RoRequest.java					0.3-3 06/05/2001
3    *
4    *  This file is part of the HTTPClient package
5    *  Copyright (C) 1996-2001 Ronald Tschalär
6    *
7    *  This library is free software; you can redistribute it and/or
8    *  modify it under the terms of the GNU Lesser General Public
9    *  License as published by the Free Software Foundation; either
10   *  version 2 of the License, or (at your option) any later version.
11   *
12   *  This library is distributed in the hope that it will be useful,
13   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15   *  Lesser General Public License for more details.
16   *
17   *  You should have received a copy of the GNU Lesser General Public
18   *  License along with this library; if not, write to the Free
19   *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20   *  MA 02111-1307, USA
21   *
22   *  For questions, suggestions, bug-reports, enhancement-requests etc.
23   *  I may be contacted at:
24   *
25   *  ronald@innovation.ch
26   *
27   *  The HTTPClient's home page is located at:
28   *
29   *  http://www.innovation.ch/java/HTTPClient/ 
30   *
31   */
32  
33  package HTTPClient;
34  
35  
36  /**
37   * This interface represents the read-only interface of an http request.
38   * It is the compile-time type passed to various handlers which might
39   * need the request info but musn't modify the request.
40   *
41   * @version	0.3-3  06/05/2001
42   * @author	Ronald Tschalär
43   */
44  public interface RoRequest
45  {
46      /**
47       * @return the HTTPConnection this request is associated with
48       */
49      public HTTPConnection getConnection();
50  
51      /**
52       * @return the request method
53       */
54      public String getMethod();
55  
56      /**
57       * @return the request-uri
58       */
59      public String getRequestURI();
60  
61      /**
62       * @return the headers making up this request
63       */
64      public NVPair[] getHeaders();
65  
66      /**
67       * @return the body of this request
68       */
69      public byte[] getData();
70  
71      /**
72       * @return the output stream on which the body is written
73       */
74      public HttpOutputStream getStream();
75  
76      /**
77       * @return true if the modules or handlers for this request may popup
78       *         windows or otherwise interact with the user
79       */
80      public boolean allowUI();
81  }