/*
 * JGrapes Event Driven Framework
 * Copyright (C) 2018 Michael N. Lipp
 * 
 * This program is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Affero General Public License as published by 
 * the Free Software Foundation; either version 3 of the License, or 
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License 
 * for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License along 
 * with this program; if not, see <http://www.gnu.org/licenses/>.
 */

package org.jgrapes.http.events;

import java.net.SocketAddress;
import org.jdrupes.httpcodec.protocols.http.HttpRequest;
import org.jgrapes.net.events.Connected;

/**
 * Signals that a TCP connection for a {@link HttpRequest} has been
 * established. The event is delivered on the subchannel that has been
 * created for handling the request.
 */
public class HttpConnected extends Connected {

    private final Request.Out request;

    /**
     * Instantiates a new event.
     *
     * @param request the request
     * @param localAddress the local address
     * @param remoteAddress the remote address
     */
    public HttpConnected(Request.Out request, SocketAddress localAddress,
            SocketAddress remoteAddress) {
        super(localAddress, remoteAddress);
        this.request = request;
    }

    /**
     * Returns the request. The object returned is the object from the
     * original {@link Request.Out} event.
     *
     * @return the request
     */
    public Request.Out request() {
        return request;
    }

}

@@ -895,19 +895,18 @@
 pes.
-net
+io
 .events.
 Conn
@@ -901,23 +901,20 @@
 .events.
-Connect
+Open
 ed;%0A%0A/**
@@ -936,10 +936,11 @@
 t a 
+HT
 T
-C
 P co
@@ -1130,23 +1130,20 @@
 extends 
-Connect
+Open
 ed %7B%0A%0A  
@@ -1178,16 +1178,109 @@
 request;
+%0A    private final SocketAddress localAddress;%0A    private final SocketAddress remoteAddress;
 %0A%0A    /*
@@ -1351,24 +1351,137 @@
 the request%0A
+     * @param netEvent the net event the network layer event that%0A     * caused the connection to be established%0A
      * @para
@@ -1613,16 +1613,28 @@
 request,
+%0A           
  SocketA
@@ -1653,28 +1653,16 @@
 Address,
-%0A           
  SocketA
@@ -1697,14 +1697,45 @@
     
-super(
+this.request = request;%0A        this.
 loca
@@ -1746,24 +1746,23 @@
 ress
-, remote
+ = local
 Address
-)
 ;%0A  
@@ -1770,39 +1770,51 @@
      this.re
-quest
+moteAddress
  = re
-quest
+moteAddress
 ;%0A    %7D%0A%0A   
@@ -2040,10 +2040,264 @@
 %0A    %7D%0A%0A
+    /**%0A     * @return the localAddress%0A     */%0A    public SocketAddress localAddress() %7B%0A        return localAddress;%0A    %7D%0A%0A    /**%0A     * @return the remoteAddress%0A     */%0A    public SocketAddress remoteAddress() %7B%0A        return remoteAddress;%0A    %7D%0A
 %7D%0A

Remove unjustified inheritance relation.