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 AbstractConnection
con
The connection.protected LocalAbstractConnectionHandler
conhandler
The other connection.protected java.util.Map<java.lang.String,java.lang.Object>
nonfunc
The 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 void
close()
Close the connection.IFuture<java.lang.Void>
doClose()
Called from connection.protected AbstractConnection
getConnection()
Get the connection.LocalAbstractConnectionHandler
getConnectionHandler()
Get the conhandler.int
getConnectionId()
Get the id.java.util.Map<java.lang.String,java.lang.Object>
getNonFunctionalProperties()
Get the non-functional properties of the connection.void
initReceived()
Received the init message.void
notifyInited()
IFuture<java.lang.Void>
sendInit()
Send init message.void
setConnection(AbstractConnection con)
Set the connection (needed as connection and handler need each other).void
setConnectionHandler(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:
sendInit
in interfaceIAbstractConnectionHandler
-
notifyInited
public void notifyInited()
- Specified by:
notifyInited
in interfaceIAbstractConnectionHandler
-
doClose
public IFuture<java.lang.Void> doClose()
Called from connection. Initiates closing procedure (is different for initiator and participant).- Specified by:
doClose
in 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:
setConnection
in 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:
getNonFunctionalProperties
in interfaceIAbstractConnectionHandler
- Returns:
- The non-functional properties.
-
-