public class SingleNodeConnectionIdGenerator extends Object implements ConnectionIdGenerator
| Constructor and Description |
|---|
SingleNodeConnectionIdGenerator(int connectionIdLength)
Create new connection id generator.
|
| Modifier and Type | Method and Description |
|---|---|
ConnectionId |
createConnectionId()
Creates a connection id.
|
ConnectionId |
read(org.eclipse.californium.elements.util.DatagramReader reader)
Read connection id from record header bytes.
|
boolean |
useConnectionId()
Indicates, if connection ids are used or just supported.
|
public SingleNodeConnectionIdGenerator(int connectionIdLength)
connectionIdLength - length of connection id. 0 to support
connection id of the other peer, but not using it for this
peer.IllegalArgumentException - if length is less than 0 bytespublic boolean useConnectionId()
ConnectionIdGeneratoruseConnectionId in interface ConnectionIdGeneratortrue, if a connection is used, false, if only a
connection id from the other peer is supported.public ConnectionId createConnectionId()
ConnectionIdGeneratorcreateConnectionId in interface ConnectionIdGeneratornull, if this generator only
supports connection ids from the other peer.public ConnectionId read(org.eclipse.californium.elements.util.DatagramReader reader)
ConnectionIdGeneratorread in interface ConnectionIdGeneratorreader - reader with header bytes at the position of the connection
id.null, if this generator only
supports connection ids from the other peer.Copyright © 2023 Eclipse Foundation. All rights reserved.