tuwien.auto.calimero.mgmt
Class Destination.AggregatorProxy

java.lang.Object
  extended by tuwien.auto.calimero.mgmt.Destination.AggregatorProxy
Enclosing class:
Destination

public static final class Destination.AggregatorProxy
extends java.lang.Object

An aggregator proxy is associated with one destination and is supplied at the creation of a new destination object.

Used by the owner of a destination handling the communication and used to modify destination state and obtain internal connection settings.

By default, this proxy is created by a transport layer implementation.


Constructor Summary
Destination.AggregatorProxy(TransportLayer aggregator)
          Creates a new aggregator proxy.
 
Method Summary
 Destination getDestination()
          Returns the destination associated with this proxy.
 int getSeqReceive()
          Returns the receive sequence number of the connection.
 int getSeqSend()
          Returns the send sequence number of the connection.
 void incSeqReceive()
          Increments the receive sequence number by one.
 void incSeqSend()
          Increments the send sequence number by one.
 void restartTimeout()
          Restarts the connection timeout used for the destination connection.
 void setState(byte newState)
          Sets a new destination connection state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Destination.AggregatorProxy

public Destination.AggregatorProxy(TransportLayer aggregator)
Creates a new aggregator proxy.

Parameters:
aggregator - the transport layer serving the destination associated with this proxy and handles necessary transport layer communication
Method Detail

getDestination

public Destination getDestination()
Returns the destination associated with this proxy.

Returns:
the Destination

getSeqReceive

public int getSeqReceive()
Returns the receive sequence number of the connection.

Returns:
sequence number, 0 <= number <= 15

getSeqSend

public int getSeqSend()
Returns the send sequence number of the connection.

Returns:
sequence number, 0 <= number <= 15

incSeqReceive

public void incSeqReceive()
Increments the receive sequence number by one.

The new sequence number is the next expected receive sequence number, with increment on sequence number 15 resulting in 0.


incSeqSend

public void incSeqSend()
Increments the send sequence number by one.

The new sequence number is the next expected send sequence number, with increment on sequence number 15 resulting in 0.


restartTimeout

public void restartTimeout()
Restarts the connection timeout used for the destination connection.

This method is only used in connection oriented communication mode.

Throws:
KNXIllegalStateException - if invoked on not connection oriented mode

setState

public void setState(byte newState)
Sets a new destination connection state.

If necessary, the connection timeout for the destination is started, restarted or deactivated according the state transition.
If the state of destination is Destination.DESTROYED, setting of a new state is ignored.

Parameters:
newState - new destination state