1 20 package org.apache.mina.common; 21 22 import java.net.SocketAddress ; 23 import java.util.Set ; 24 25 51 public interface IoSession { 52 53 56 IoService getService(); 57 58 61 IoServiceConfig getServiceConfig(); 62 63 66 IoHandler getHandler(); 67 68 71 IoSessionConfig getConfig(); 72 73 76 IoFilterChain getFilterChain(); 77 78 85 WriteFuture write(Object message); 86 87 92 CloseFuture close(); 93 94 98 Object getAttachment(); 99 100 106 Object setAttachment(Object attachment); 107 108 114 Object getAttribute(String key); 115 116 123 Object setAttribute(String key, Object value); 124 125 133 Object setAttribute(String key); 134 135 140 Object removeAttribute(String key); 141 142 146 boolean containsAttribute(String key); 147 148 151 Set <String > getAttributeKeys(); 152 153 156 TransportType getTransportType(); 157 158 161 boolean isConnected(); 162 163 167 boolean isClosing(); 168 169 173 CloseFuture getCloseFuture(); 174 175 178 SocketAddress getRemoteAddress(); 179 180 184 SocketAddress getLocalAddress(); 185 186 194 SocketAddress getServiceAddress(); 195 196 199 int getIdleTime(IdleStatus status); 200 201 204 long getIdleTimeInMillis(IdleStatus status); 205 206 209 void setIdleTime(IdleStatus status, int idleTime); 210 211 214 int getWriteTimeout(); 215 216 219 long getWriteTimeoutInMillis(); 220 221 224 void setWriteTimeout(int writeTimeout); 225 226 229 TrafficMask getTrafficMask(); 230 231 236 void setTrafficMask(TrafficMask trafficMask); 237 238 242 void suspendRead(); 243 244 248 void suspendWrite(); 249 250 254 void resumeRead(); 255 256 260 void resumeWrite(); 261 262 265 long getReadBytes(); 266 267 270 long getWrittenBytes(); 271 272 275 long getReadMessages(); 276 277 280 long getWrittenMessages(); 281 282 285 long getWrittenWriteRequests(); 286 287 291 int getScheduledWriteRequests(); 292 293 297 int getScheduledWriteBytes(); 298 299 302 long getCreationTime(); 303 304 307 long getLastIoTime(); 308 309 312 long getLastReadTime(); 313 314 317 long getLastWriteTime(); 318 319 323 boolean isIdle(IdleStatus status); 324 325 335 int getIdleCount(IdleStatus status); 336 337 341 long getLastIdleTime(IdleStatus status); 342 } 343 | Popular Tags |