1 52 53 package com.go.trove.net; 54 55 import java.net.*; 56 57 64 public interface SocketFactory { 65 70 public InetAddressAndPort getInetAddressAndPort(); 71 72 80 public InetAddressAndPort getInetAddressAndPort(Object session); 81 82 86 public long getDefaultTimeout(); 87 88 95 public CheckedSocket createSocket() 96 throws ConnectException, SocketException; 97 98 107 public CheckedSocket createSocket(Object session) 108 throws ConnectException, SocketException; 109 110 119 public CheckedSocket createSocket(long timeout) 120 throws ConnectException, SocketException; 121 122 133 public CheckedSocket createSocket(Object session, long timeout) 134 throws ConnectException, SocketException; 135 136 143 public CheckedSocket getSocket() throws ConnectException, SocketException; 144 145 154 public CheckedSocket getSocket(Object session) 155 throws ConnectException, SocketException; 156 157 166 public CheckedSocket getSocket(long timeout) 167 throws ConnectException, SocketException; 168 169 180 public CheckedSocket getSocket(Object session, long timeout) 181 throws ConnectException, SocketException; 182 183 193 public void recycleSocket(CheckedSocket socket) 194 throws SocketException, IllegalArgumentException ; 195 196 200 public void clear(); 201 202 205 public int getAvailableCount(); 206 } 207 | Popular Tags |