cloudsea.datacollector.socketpool
类 ConnectionAdapter

java.lang.Object
  继承者 java.net.Socket
      继承者 cloudsea.datacollector.socketpool.ConnectionAdapter

public class ConnectionAdapter
extends java.net.Socket


构造方法摘要
ConnectionAdapter()
          默认的构造函数
 
方法摘要
 void close()
          当客户端关闭连接的时候状态设置为true(空闲)
 void destroy()
          注销连接
 boolean isFree()
          判断此连接是否空闲
 void setBusy()
          当使用此连接的时候设置状态为false(忙碌)
 void trueClose()
          真实的关闭连接
 
从类 java.net.Socket 继承的方法
bind, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

ConnectionAdapter

public ConnectionAdapter()
默认的构造函数

方法详细信息

isFree

public boolean isFree()
判断此连接是否空闲

返回:
boolean 空闲返回ture,否则false

setBusy

public void setBusy()
当使用此连接的时候设置状态为false(忙碌)


close

public void close()
当客户端关闭连接的时候状态设置为true(空闲)

覆盖:
java.net.Socket 中的 close

trueClose

public void trueClose()
               throws java.io.IOException
真实的关闭连接

抛出:
java.io.IOException

destroy

public void destroy()
注销连接