org.alliance.core.comm
Class Connection
java.lang.Object
org.alliance.core.comm.Connection
- Direct Known Subclasses:
- PacketConnection
public abstract class Connection
- extends java.lang.Object
Created by IntelliJ IDEA.
User: maciek
Date: 2005-dec-26
Time: 11:56:52
To change this template use File | Settings | File Templates.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
netMan
protected NetworkManager netMan
core
protected CoreSubsystem core
key
protected java.lang.Object key
direction
protected Connection.Direction direction
hasWriteInterest
protected boolean hasWriteInterest
bytesSent
protected long bytesSent
bytesReceived
protected long bytesReceived
bandwidthIn
protected BandwidthAnalyzer bandwidthIn
bandwidthOut
protected BandwidthAnalyzer bandwidthOut
statusString
protected java.lang.String statusString
connected
protected boolean connected
Connection
protected Connection(NetworkManager netMan,
Connection.Direction direction)
Connection
protected Connection(NetworkManager netMan,
Connection.Direction direction,
java.lang.Object key)
received
public abstract void received(java.nio.ByteBuffer buf)
throws java.io.IOException
- Throws:
java.io.IOException
readyToSend
public abstract void readyToSend()
throws java.io.IOException
- Throws:
java.io.IOException
getConnectionId
protected abstract int getConnectionId()
getConnectionIdForRemote
public int getConnectionIdForRemote()
bytesReceived
public void bytesReceived(int n)
bytesSent
public void bytesSent(int sent)
setKey
public void setKey(java.lang.Object key)
getDirection
public Connection.Direction getDirection()
init
public void init()
throws java.io.IOException
- Throws:
java.io.IOException
getNetMan
public NetworkManager getNetMan()
getKey
public java.lang.Object getKey()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
close
public void close()
throws java.io.IOException
- Close this connection
- Throws:
java.io.IOException
getBytesSent
public long getBytesSent()
getBytesReceived
public long getBytesReceived()
hasWriteInterest
public boolean hasWriteInterest()
setHasWriteInterest
public void setHasWriteInterest(boolean hasWriteInterest)
getStatusString
public java.lang.String getStatusString()
setStatusString
public void setStatusString(java.lang.String statusString)
getBandwidthIn
public BandwidthAnalyzer getBandwidthIn()
getBandwidthOut
public BandwidthAnalyzer getBandwidthOut()
isConnected
public boolean isConnected()