public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime) throws IOException { super(channel, maxIdleTime); _manager = selectSet.getManager(); _selectSet = selectSet; _state=STATE_UNDISPATCHED; _onIdle=false; _open=true; _key = key; setCheckForIdle(true); }
@Override public int fill(Buffer buffer) throws IOException { int read = super.fill(buffer); notifyIncoming(buffer, read); return read; }
@Override protected SelectChannelEndPoint newEndPoint(SocketChannel channel, SelectorManager.SelectSet selectSet, SelectionKey key) throws IOException { NetworkTrafficSelectChannelEndPoint endPoint = new NetworkTrafficSelectChannelEndPoint(channel, selectSet, key, _maxIdleTime, listeners); endPoint.setConnection(selectSet.getManager().newConnection(channel,endPoint, key.attachment())); endPoint.notifyOpened(); return endPoint; }
protected SelectChannelEndPoint newEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key) throws IOException { SelectChannelEndPoint endp= new SelectChannelEndPoint(channel,selectSet,key, SelectChannelConnector.this._maxIdleTime); endp.setConnection(selectSet.getManager().newConnection(channel,endp, key.attachment())); return endp; }
public void addChange(SelectableChannel channel, Object att) { if (att==null) addChange(channel); else if (att instanceof EndPoint) addChange(att); else addChange(new ChannelAndAttachment(channel,att)); }
public void cancelTimeout(Task task) { getSelectSet().cancelTimeout(task); }
public void scheduleTimeout(Task task, long timeoutMs) { getSelectSet().scheduleTimeout(task,timeoutMs); }
protected SelectChannelEndPoint newEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key) throws IOException { SelectChannelEndPoint endp= new SelectChannelEndPoint(channel,selectSet,key, SelectChannelConnector.this._maxIdleTime); endp.setConnection(selectSet.getManager().newConnection(channel,endp, key.attachment())); return endp; }
public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime) throws IOException { super(channel, maxIdleTime); _manager = selectSet.getManager(); _selectSet = selectSet; _state=STATE_UNDISPATCHED; _onIdle=false; _open=true; _key = key; setCheckForIdle(true); }
public void addChange(SelectableChannel channel, Object att) { if (att==null) addChange(channel); else if (att instanceof EndPoint) addChange(att); else addChange(new ChannelAndAttachment(channel,att)); }
public void cancelTimeout(Task task) { getSelectSet().cancelTimeout(task); }
public void scheduleTimeout(Task task, long timeoutMs) { getSelectSet().scheduleTimeout(task,timeoutMs); }
public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime) throws IOException { super(channel, maxIdleTime); _manager = selectSet.getManager(); _selectSet = selectSet; _state=STATE_UNDISPATCHED; _onIdle=false; _open=true; _key = key; setCheckForIdle(true); }
public void addChange(SelectableChannel channel, Object att) { if (att==null) addChange(channel); else if (att instanceof EndPoint) addChange(att); else addChange(new ChannelAndAttachment(channel,att)); }
public void cancelTimeout(Task task) { getSelectSet().cancelTimeout(task); }
public void addChange(SelectableChannel channel, Object att) { if (att==null) addChange(channel); else if (att instanceof EndPoint) addChange(att); else addChange(new ChannelAndAttachment(channel,att)); }