|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttuwien.auto.calimero.mgmt.Destination
public class Destination
Represents a transport layer logical connection destination.
It keeps settings to use for communication with a destination and maintains the logical
connection state. In connection oriented mode, a timer is used to detect the connection
timeout and send a disconnect.
The actual layer 4 communication is done by a TransportLayer
(the aggregator
for the destination) specified with the Destination.AggregatorProxy
.
A destination object is usually created and maintained by a TransportLayer or
ManagementClient
implementation.
After a destination got destroyed, it can't be used for communication to that
destination anymore, i.e. it's not possible to change the connection state.
TransportLayer
,
ManagementClient
Nested Class Summary | |
---|---|
static class |
Destination.AggregatorProxy
An aggregator proxy is associated with one destination and is supplied at the creation of a new destination object. |
Field Summary | |
---|---|
static byte |
CONNECTING
Connection state is connecting. |
static byte |
DESTROYED
Destination is destroyed. |
static byte |
DISCONNECTED
Connection state is disconnected. |
static byte |
OPEN_IDLE
Connection state is open and communication is idle. |
static byte |
OPEN_WAIT
Connection state is open and communication is waiting for L4 acknowledge. |
Constructor Summary | |
---|---|
Destination(Destination.AggregatorProxy aggregator,
IndividualAddress remote,
boolean connectionOriented)
Creates a new destination. |
|
Destination(Destination.AggregatorProxy aggregator,
IndividualAddress remote,
boolean connectionOriented,
boolean keepAlive,
boolean verifyMode)
Creates a new destination with all available destination connection settings. |
Method Summary | |
---|---|
void |
destroy()
Destroys this destination. |
IndividualAddress |
getAddress()
Returns the destination address. |
byte |
getState()
Returns the state of this destination. |
boolean |
isConnectionOriented()
Returns whether this destination uses connection oriented mode or connectionless mode. |
boolean |
isKeepAlive()
Returns whether keep alive of connection is specified. |
boolean |
isVerifyMode()
Returns whether verify mode is supported by the destination. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte CONNECTING
getState()
,
Constant Field Valuespublic static final byte DESTROYED
getState()
,
Constant Field Valuespublic static final byte DISCONNECTED
getState()
,
Constant Field Valuespublic static final byte OPEN_IDLE
getState()
,
Constant Field Valuespublic static final byte OPEN_WAIT
getState()
,
Constant Field ValuesConstructor Detail |
---|
public Destination(Destination.AggregatorProxy aggregator, IndividualAddress remote, boolean connectionOriented)
Verify mode defaults to false and keep alive is not used.
aggregator
- aggregator proxy to associate with this destinationremote
- KNX remote address specifying the connection destinationconnectionOriented
- true
for connection oriented mode,
false
to use connectionless modepublic Destination(Destination.AggregatorProxy aggregator, IndividualAddress remote, boolean connectionOriented, boolean keepAlive, boolean verifyMode)
Keep alive of a logical connection is only available in connection oriented mode,
in connectionless mode keep alive is always disabled.
Implementation note: the keep alive option is not implemented by now and
not used by this destination. Nevertheless, it is set and might be queried using
isKeepAlive()
.
The verify mode refers to the verify mode control in application layer services and
specifies whether the specified destination to communicate with supports verified
writing of data.
aggregator
- aggregator proxy to associate with this destinationremote
- KNX remote address specifying the connection destinationconnectionOriented
- true
for connection oriented mode,
false
to use connectionless modekeepAlive
- true
to prevent a timing out of the logical
connection in connection oriented mode, false
to use default
connection timeoutverifyMode
- true
to indicate the destination has verify mode
enabled, false
otherwiseMethod Detail |
---|
public void destroy()
If the connection state is connected, it will be disconnected. The connection state
is set to DESTROYED
. The associated transport layer is notified through
TransportLayer.destroyDestination(Destination)
.
On an already destroyed destination, no action is performed.
public IndividualAddress getAddress()
public final byte getState()
The returned value is one of the destination state constants.
public final boolean isConnectionOriented()
true
for connection oriented mode, false
otherwisepublic final boolean isKeepAlive()
true
if keep alive is specified and connection oriented mode
is used, false
otherwisepublic final boolean isVerifyMode()
true
for verify mode enabled, false
otherwisepublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |