Package jadex.bridge.component.streams
Class LocalAbstractConnectionHandler
- java.lang.Object
-
- jadex.bridge.component.streams.LocalAbstractConnectionHandler
-
- All Implemented Interfaces:
IAbstractConnectionHandler
- Direct Known Subclasses:
LocalInputConnectionHandler,LocalOutputConnectionHandler
public class LocalAbstractConnectionHandler extends java.lang.Object implements IAbstractConnectionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractConnectionconThe connection.protected LocalAbstractConnectionHandlerconhandlerThe other connection.protected java.util.Map<java.lang.String,java.lang.Object>nonfuncThe non-functional properties.
-
Constructor Summary
Constructors Constructor Description LocalAbstractConnectionHandler(java.util.Map<java.lang.String,java.lang.Object> nonfunc)LocalAbstractConnectionHandler(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 voidclose()Close the connection.IFuture<java.lang.Void>doClose()Called from connection.protected AbstractConnectiongetConnection()Get the connection.LocalAbstractConnectionHandlergetConnectionHandler()Get the conhandler.intgetConnectionId()Get the id.java.util.Map<java.lang.String,java.lang.Object>getNonFunctionalProperties()Get the non-functional properties of the connection.voidinitReceived()Received the init message.voidnotifyInited()IFuture<java.lang.Void>sendInit()Send init message.voidsetConnection(AbstractConnection con)Set the connection (needed as connection and handler need each other).voidsetConnectionHandler(LocalAbstractConnectionHandler conhandler)Set the connection handler of the other side.
-
-
-
Field Detail
-
con
protected AbstractConnection con
The connection.
-
conhandler
protected LocalAbstractConnectionHandler conhandler
The other connection.
-
nonfunc
protected java.util.Map<java.lang.String,java.lang.Object> nonfunc
The non-functional properties.
-
-
Constructor Detail
-
LocalAbstractConnectionHandler
public LocalAbstractConnectionHandler(java.util.Map<java.lang.String,java.lang.Object> nonfunc)
-
LocalAbstractConnectionHandler
public LocalAbstractConnectionHandler(java.util.Map<java.lang.String,java.lang.Object> nonfunc, LocalAbstractConnectionHandler conhandler)
-
-
Method Detail
-
sendInit
public IFuture<java.lang.Void> sendInit()
Send init message.- Specified by:
sendInitin interfaceIAbstractConnectionHandler
-
notifyInited
public void notifyInited()
- Specified by:
notifyInitedin interfaceIAbstractConnectionHandler
-
doClose
public IFuture<java.lang.Void> doClose()
Called from connection. Initiates closing procedure (is different for initiator and participant).- Specified by:
doClosein interfaceIAbstractConnectionHandler
-
initReceived
public void initReceived()
Received the init message.
-
close
public void close()
Close the connection. Notifies the other side that the connection has been closed.
-
getConnectionId
public int getConnectionId()
Get the id.- Returns:
- the id.
-
getConnection
protected AbstractConnection getConnection()
Get the connection.- Returns:
- The connection.
-
setConnection
public void setConnection(AbstractConnection con)
Set the connection (needed as connection and handler need each other). The connections uses this method to set itself as connection in their constructor.- Specified by:
setConnectionin interfaceIAbstractConnectionHandler
-
getConnectionHandler
public LocalAbstractConnectionHandler getConnectionHandler()
Get the conhandler.- Returns:
- the conhandler.
-
setConnectionHandler
public void setConnectionHandler(LocalAbstractConnectionHandler conhandler)
Set the connection handler of the other side.
-
getNonFunctionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getNonFunctionalProperties()
Get the non-functional properties of the connection.- Specified by:
getNonFunctionalPropertiesin interfaceIAbstractConnectionHandler- Returns:
- The non-functional properties.
-
-