Project Report: fawkez

Packagesummary org.jcoderz.commons.connector.http

org.jcoderz.commons.connector.http.HttpConnection

LineHitsNoteSource
1  /*
2   * $Id: HttpConnection.java 1011 2008-06-16 17:57:36Z amandel $
3   *
4   * Copyright 2006, The jCoderZ.org Project. All rights reserved.
5   *
6   * Redistribution and use in source and binary forms, with or without
7   * modification, are permitted provided that the following conditions are
8   * met:
9   *
10   *    * Redistributions of source code must retain the above copyright
11   *      notice, this list of conditions and the following disclaimer.
12   *    * Redistributions in binary form must reproduce the above
13   *      copyright notice, this list of conditions and the following
14   *      disclaimer in the documentation and/or other materials
15   *      provided with the distribution.
16   *    * Neither the name of the jCoderZ.org Project nor the names of
17   *      its contributors may be used to endorse or promote products
18   *      derived from this software without specific prior written
19   *      permission.
20   *
21   * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
22   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24   * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS
25   * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
28   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32   */
33  package org.jcoderz.commons.connector.http;
34  
35  import javax.resource.ResourceException;
36  
37  import org.jcoderz.commons.connector.ConnectorException;
38  import org.jcoderz.commons.connector.http.transport.ConnectorContext;
39  import org.jcoderz.commons.connector.http.transport.HttpConnectorEventListener;
40  import org.jcoderz.commons.connector.http.transport.HttpRequestResponseHeader;
41  
42  
43  /**
44   * This is the interface provided by the commons http connector.
45   */
46 (1)public interface HttpConnection
47  {
48     /**
49      * Send a http message using retries to the peer associated with the
50      * connection in use and afterwards receive a response from it.
51      *
52      * @param message the request message that have to be send to the peer.
53      * @return byte array containing the received http response from the peer.
54      * @throws ResourceException indicating an error while sending a request
55      *          and receiving a response detected by the application server
56      * @throws ConnectorException in case of a failure on transport level
57      *          whilst sending/receiving the request/response
58      */
59     byte[] sendAndReceive (byte[] message)
60           throws ResourceException, ConnectorException;
61  
62     /**
63      * Initiates close of the connection handle at the application level.
64      * A connection client is required to call this method after the
65      * connection is no more in use.
66      * The physical connection will be still open afterwards.
67      */
68     void close ();
69  
70     /**
71      * Sets the listener for http connector events like request send and
72      * response received.
73      *
74      * @param listener the listener providing callback methods used by the
75      *         connector
76      * @param context used whilst callbacks
77      * @throws ResourceException if appserver fails performing the call
78      *          on the managed connection
79      */
80     void setEventListener (HttpConnectorEventListener listener,
81           ConnectorContext context)
82           throws ResourceException;
83  
84     /**
85      * Sets http request header values used whilst sending the request
86      * and http response header validated whilst receiveing the response.
87      *
88      * @param header contains request header to set and response header to
89      *          validate
90      * @throws ResourceException in case of appserver failure
91      */
92     void setRequestResponseHeader (HttpRequestResponseHeader header)
93           throws ResourceException;
94  }

Findings in this File

c (2) Got an exception - java.lang.RuntimeException: Unable to get class information for @throws tag 'ResourceException'.
c (1) 46 : 0 Type Javadoc comment is missing an @author tag.