Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 22 package org.xsocket.stream; 23 24 import java.io.Closeable ; 25 import java.io.IOException ; 26 import java.net.InetAddress ; 27 import java.util.Map ; 28 import java.util.concurrent.Executor ; 29 30 31 import org.xsocket.IWorkerPool; 32 33 34 35 36 37 38 108 public interface IMultithreadedServer extends Runnable , Closeable { 109 110 111 115 public static final int DEFAULT_RECEIVE_BUFFER_PREALLOCATION_SIZE = 64768; 116 117 118 121 public static final int DEFAULT_IDLE_TIMEOUT_SEC = 1 * 60 * 60; 123 124 125 128 public static final int DEFAULT_CONNECTION_TIMEOUT_SEC = Integer.MAX_VALUE; 130 131 public static final String SO_RCVBUF = IConnection.SO_RCVBUF; 132 public static final String SO_REUSEADDR = IConnection.SO_REUSEADDR; 133 134 135 140 public boolean isOpen(); 141 142 143 150 public void setHandler(IHandler handler); 151 152 153 154 166 public void setWorkerPool(IWorkerPool workerPool); 167 168 169 175 public IWorkerPool getWorkerPool(); 176 177 178 183 public Executor getWorkerpool(); 184 185 186 193 public void setReceiveBufferPreallocationSize(int size); 194 195 196 203 public int getReceiveBufferPreallocationSize(); 204 205 206 207 208 213 public int getIdleTimeoutSec(); 214 215 216 217 222 public void setIdleTimeoutSec(int timeoutInSec); 223 224 225 229 public void addListener(IMutlithreadedServerListener listener); 230 231 232 237 public boolean removeListener(IMutlithreadedServerListener listener); 238 239 240 245 public int getConnectionTimeoutSec(); 246 247 248 255 public void setConnectionTimeoutSec(int timeoutSec); 256 257 258 259 264 public int getLocalPort(); 265 266 267 271 public InetAddress getLocalAddress(); 272 273 274 280 public void setDispatcherPoolSize(int size); 281 282 283 290 public int getDispatcherPoolSize(); 291 292 293 294 301 public Object getOption(String name) throws IOException ; 302 303 304 305 313 public Map <String ,Class > getOptions(); 314 } 315
| Popular Tags
|