1 /* 2 * Created on 17-Jan-2006 3 * Created by Paul Gardner 4 * Copyright (C) Azureus Software, Inc, All Rights Reserved. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 9 * of the License, or (at your option) any later version. 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 */ 19 20 package com.aelitis.azureus.core.networkmanager.impl; 21 22 import java.io.IOException; 23 import java.nio.ByteBuffer; 24 25 public interface 26 TransportHelperFilter 27 { 28 public long write( ByteBuffer[] buffers, int array_offset, int length )29 write( 30 ByteBuffer[] buffers, 31 int array_offset, 32 int length ) 33 34 throws IOException; 35 36 public long read( ByteBuffer[] buffers, int array_offset, int length )37 read( 38 ByteBuffer[] buffers, 39 int array_offset, 40 int length ) 41 42 throws IOException; 43 44 public boolean hasBufferedWrite()45 hasBufferedWrite(); 46 47 public boolean hasBufferedRead()48 hasBufferedRead(); 49 50 public TransportHelper getHelper()51 getHelper(); 52 53 public String getName(boolean verbose)54 getName(boolean verbose); 55 56 public boolean isEncrypted()57 isEncrypted(); 58 59 public void setTrace( boolean on )60 setTrace( 61 boolean on ); 62 } 63