public final class UtlFabricAddress extends Object
This class contains runtime utility methods to create and manipulate fabric addresses.
This class IS NOT intended to be used by end users.
| Constructor and Description |
|---|
UtlFabricAddress() |
| Modifier and Type | Method and Description |
|---|---|
static int |
create(short routerL2Addr,
short routerL1Addr,
short clientAddr)
Create a fabric address
|
static short |
extractClient(int addr)
Extract the client address from an fabric address
|
static int |
extractRouter(int addr)
Extract the router address from an fabric address
|
static short |
extractRouterL1(int addr)
Extract the level 1 router address from an fabric address
|
static short |
extractRouterL2(int addr)
Extract the level 2 router address from an fabric address.
|
static int |
fromString(String str)
Convert a fabric address from its dotted notation to a an encoded integer
|
static boolean |
isTargetingRouter(short destL1Addr,
short destL2Addr,
short routerL1Addr,
short routerL2Addr)
Check whether an fabric address addresses a specified router.
|
static String |
toString(int addr)
Return an fabric address in its dotted notation.
|
static void |
validateClient(short clientAddr)
Validate whether a client address is valid
|
static void |
validateRouterL1(short routerL1Addr)
Validate whether a level 1 router address is valid
|
static void |
validateRouterL2(short routerL2Addr)
Validate whether a level 2 router address is valid.
|
public static int create(short routerL2Addr,
short routerL1Addr,
short clientAddr)
routerL2Addr - The router level 2 addressrouterL1Addr - The router level 1 addressclientAddr - The client addressAn fabric address consists of a router address and a client address. The router part of the address consists of a level 2 and level 1 address that, put together, uniquely identifies a router in the system. The client part uniquely identifies a client within the scope of the router it is connected to. Put together, these elements form a fabric address that uniquely identifies any agent in a deployment.
public static short extractRouterL2(int addr)
addr - The address to parsepublic static short extractRouterL1(int addr)
addr - The fabric address to parsepublic static int extractRouter(int addr)
addr - The fabric address to parsepublic static short extractClient(int addr)
addr - The fabric address to parsepublic static void validateRouterL2(short routerL2Addr)
routerL2Addr - The address to validateIllegalArgumentException - Thrown if the address is not validpublic static void validateRouterL1(short routerL1Addr)
routerL1Addr - The address to validateIllegalArgumentException - Thrown if the address is not validpublic static void validateClient(short clientAddr)
clientAddr - The address to validateIllegalArgumentException - Thrown if the address is not validpublic static String toString(int addr)
addr - The fabric address to parsepublic static int fromString(String str)
str - The string to parseRuntimeException - Thrown is the format of the provided fabric
address is incorrect.public static boolean isTargetingRouter(short destL1Addr,
short destL2Addr,
short routerL1Addr,
short routerL2Addr)
destL1Addr - The L1 address portion of the address to check.destL2Addr - The L2 address portion of the address to check.routerL1Addr - This router's L1 addressrouterL2Addr - This router's L2 addressCopyright © 2019 Neeve Research, LLC. All Rights Reserved.