Class DiameterURI
- java.lang.Object
-
- org.jainslee.resources.diameter.base.types.DiameterURI
-
public class DiameterURI extends Object
Java class to represent the DiameterURI AVP type. The DiameterURI MUST follow the Uniform Resource Identifiers (RFC 3986) syntax [RFC3986] rules specified below:"aaa://" FQDN [ port ] [ transport ] [ protocol ] ; No transport security "aaas://" FQDN [ port ] [ transport ] [ protocol ] ; Transport security used FQDN = Fully Qualified Host Name port = ":" 1*DIGIT ; One of the ports used to listen for ; incoming connections. ; If absent, the default Diameter port ; (3868) is assumed if no transport ; security is used and port 5868 when ; transport security (TLS/TCP and DTLS/SCTP) ; is used. transport = ";transport=" transport-protocol ; One of the transports used to listen ; for incoming connections. If absent, ; the default protocol is assumed to be TCP. ; UDP MUST NOT be used when the aaa-protocol ; field is set to diameter. transport-protocol = ( "tcp" / "sctp" / "udp" ) protocol = ";protocol=" aaa-protocol ; If absent, the default AAA protocol ; is diameter. aaa-protocol = ( "diameter" / "radius" / "tacacs+" ) The following are examples of valid Diameter host identities: aaa://host.example.com;transport=tcp aaa://host.example.com:6666;transport=tcp aaa://host.example.com;protocol=diameter aaa://host.example.com:6666;protocol=diameter aaa://host.example.com:6666;transport=tcp;protocol=diameter aaa://host.example.com:1813;transport=udp;protocol=radius
- Author:
- Open Cloud
-
-
Field Summary
Fields Modifier and Type Field Description static int
PROTOCOL_DIAMETER
static int
PROTOCOL_RADIUS
static int
PROTOCOL_TACACSPLUS
static int
TRANSPORT_SCTP
static int
TRANSPORT_TCP
static int
TRANSPORT_UDP
-
Constructor Summary
Constructors Constructor Description DiameterURI(String uri)
DiameterURI(String fqdn, int port, int protocol, int transport, boolean secure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
byte[]
getBytes()
Return the contents of this URI as a byte array.String
getHostname()
int
getPort()
int
getProtocol()
boolean
getSecure()
int
getTransport()
int
hashCode()
String
toString()
-
-
-
Field Detail
-
TRANSPORT_TCP
public static final int TRANSPORT_TCP
- See Also:
- Constant Field Values
-
TRANSPORT_SCTP
public static final int TRANSPORT_SCTP
- See Also:
- Constant Field Values
-
TRANSPORT_UDP
public static final int TRANSPORT_UDP
- See Also:
- Constant Field Values
-
PROTOCOL_DIAMETER
public static final int PROTOCOL_DIAMETER
- See Also:
- Constant Field Values
-
PROTOCOL_RADIUS
public static final int PROTOCOL_RADIUS
- See Also:
- Constant Field Values
-
PROTOCOL_TACACSPLUS
public static final int PROTOCOL_TACACSPLUS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DiameterURI
public DiameterURI(String fqdn, int port, int protocol, int transport, boolean secure)
-
DiameterURI
public DiameterURI(String uri) throws URISyntaxException
- Throws:
URISyntaxException
-
-
Method Detail
-
getSecure
public boolean getSecure()
-
getHostname
public String getHostname()
-
getPort
public int getPort()
-
getProtocol
public int getProtocol()
-
getTransport
public int getTransport()
-
getBytes
public byte[] getBytes()
Return the contents of this URI as a byte array. Technically this type derives from OctetString, so we need to be able to return the value in the base type.- Returns:
- the result of toString().getBytes()
-
-