Package jadex.bridge.component.streams
Class LocalOutputConnectionHandler
- java.lang.Object
 - 
- jadex.bridge.component.streams.LocalAbstractConnectionHandler
 - 
- jadex.bridge.component.streams.LocalOutputConnectionHandler
 
 
 
- 
- All Implemented Interfaces:
 IAbstractConnectionHandler,IOutputConnectionHandler
public class LocalOutputConnectionHandler extends LocalAbstractConnectionHandler implements IOutputConnectionHandler
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected intmaxstoredThe maximum bytes of data that can be stored in connection (without being consumed).protected Future<java.lang.Integer>readyfutureThe ready future.- 
Fields inherited from class jadex.bridge.component.streams.LocalAbstractConnectionHandler
con, conhandler, nonfunc 
 - 
 
- 
Constructor Summary
Constructors Constructor Description LocalOutputConnectionHandler(java.util.Map<java.lang.String,java.lang.Object> nonfunc)LocalOutputConnectionHandler(java.util.Map<java.lang.String,java.lang.Object> nonfunc, LocalAbstractConnectionHandler conhandler) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()Flush the data.voidready(int available)Called by local input connection handler to signal that user has read some data.IFuture<java.lang.Void>send(byte[] data)Called from connection.IFuture<java.lang.Integer>waitForReady()Wait until the connection is ready for the next write.- 
Methods inherited from class jadex.bridge.component.streams.LocalAbstractConnectionHandler
close, doClose, getConnection, getConnectionHandler, getConnectionId, getNonFunctionalProperties, initReceived, notifyInited, sendInit, setConnection, setConnectionHandler 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface jadex.bridge.component.streams.IAbstractConnectionHandler
doClose, getNonFunctionalProperties, notifyInited, sendInit, setConnection 
 - 
 
 - 
 
- 
- 
Field Detail
- 
maxstored
protected int maxstored
The maximum bytes of data that can be stored in connection (without being consumed). 
- 
readyfuture
protected Future<java.lang.Integer> readyfuture
The ready future. 
 - 
 
- 
Constructor Detail
- 
LocalOutputConnectionHandler
public LocalOutputConnectionHandler(java.util.Map<java.lang.String,java.lang.Object> nonfunc)
 
- 
LocalOutputConnectionHandler
public LocalOutputConnectionHandler(java.util.Map<java.lang.String,java.lang.Object> nonfunc, LocalAbstractConnectionHandler conhandler) 
 - 
 
- 
Method Detail
- 
send
public IFuture<java.lang.Void> send(byte[] data)
Called from connection.- Specified by:
 sendin interfaceIOutputConnectionHandler
 
- 
flush
public void flush()
Flush the data.- Specified by:
 flushin interfaceIOutputConnectionHandler
 
- 
waitForReady
public IFuture<java.lang.Integer> waitForReady()
Wait until the connection is ready for the next write.- Specified by:
 waitForReadyin interfaceIOutputConnectionHandler- Returns:
 - Calls future when next data can be written.
 
 
- 
ready
public void ready(int available)
Called by local input connection handler to signal that user has read some data. 
 - 
 
 -