|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlFabricAddress
public final class UtlFabricAddress
Utility class containing methods to work with fabric addresses.
This class contains runtime utility methods to create and manipulate fabric addresses.
This class IS NOT intended to be used by end users.
Constructor Summary | |
---|---|
UtlFabricAddress()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UtlFabricAddress()
Method Detail |
---|
public static int create(short routerL2Addr, short routerL1Addr, short clientAddr)
routerL2Addr
- The router level 2 addressrouterL1Addr
- The router level 1 addressclientAddr
- The client address
An 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 parse
public static short extractRouterL1(int addr)
addr
- The fabric address to parse
public static int extractRouter(int addr)
addr
- The fabric address to parse
public static short extractClient(int addr)
addr
- The fabric address to parse
public static void validateRouterL2(short routerL2Addr)
routerL2Addr
- The address to validate
IllegalArgumentException
- Thrown if the address is not validpublic static void validateRouterL1(short routerL1Addr)
routerL1Addr
- The address to validate
IllegalArgumentException
- Thrown if the address is not validpublic static void validateClient(short clientAddr)
clientAddr
- The address to validate
IllegalArgumentException
- Thrown if the address is not validpublic static String toString(int addr)
addr
- The fabric address to parse
public static int fromString(String str)
str
- The string to parse
RuntimeException
- 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 address
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |