1 /* 2 * Created on Jul 1, 2009 3 * Created by Paul Gardner 4 * 5 * Copyright (C) Azureus Software, Inc, All Rights Reserved. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 21 package org.gudy.azureus2.core3.tracker.server; 22 23 import java.io.IOException; 24 import java.io.InputStream; 25 import java.io.OutputStream; 26 import java.net.InetSocketAddress; 27 import java.net.URL; 28 29 import org.gudy.azureus2.core3.util.AsyncController; 30 31 public interface 32 TRTrackerServerListener2 33 { 34 public boolean handleExternalRequest( ExternalRequest request )35 handleExternalRequest( 36 ExternalRequest request ) 37 38 throws IOException; 39 40 41 public interface 42 ExternalRequest 43 { 44 public InetSocketAddress getClientAddress()45 getClientAddress(); 46 47 public InetSocketAddress getLocalAddress()48 getLocalAddress(); 49 50 public String getUser()51 getUser(); 52 53 public String getURL()54 getURL(); 55 56 public URL getAbsoluteURL()57 getAbsoluteURL(); 58 59 public String getHeader()60 getHeader(); 61 62 public InputStream getInputStream()63 getInputStream(); 64 65 public OutputStream getOutputStream()66 getOutputStream(); 67 68 public boolean isActive()69 isActive(); 70 71 public AsyncController getAsyncController()72 getAsyncController(); 73 74 public boolean canKeepAlive()75 canKeepAlive(); 76 77 public void setKeepAlive( boolean ka )78 setKeepAlive( 79 boolean ka ); 80 } 81 } 82