|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object dk.i1.diameter.node.NodeSettings
public class NodeSettings
Configuration for a node.
NodeSettings contain the settings for a node including node ID, capabilities, etc.
A NodeSettings instance is required for initializing Node
and NodeManager
Example for constructing a NodeSettings instance:
Capability capability = new Capability(); capability.addAuthApp(...); capability.addAcctApp(...); NodeSettings node_settings; try { node_settings = new NodeSettings( "somehost.example.net", "example.net", 0, //vendor-id. 0 is not a valid value. capability, 3868, "ExampleNet gateway", 0x01000000); } catch (InvalidSettingException ex) { System.out.println(ex.toString()); return; }Does and donts:
Nested Class Summary | |
---|---|
static class |
NodeSettings.PortRange
A port range |
Constructor Summary | |
---|---|
NodeSettings(String host_id,
String realm,
int vendor_id,
Capability capabilities,
int port,
String product_name,
int firmware_revision)
Constructor for NodeSettings. |
Method Summary | |
---|---|
Capability |
capabilities()
Returns the configured capabilities |
int |
firmwareRevision()
Returns the firmware revision |
String |
hostId()
Returns the configured host ID |
long |
idleTimeout()
Returns the idle timeout (in milliseconds) |
int |
port()
Returns the configured listen port. |
String |
productName()
Returns the product name |
String |
realm()
Returns the configured realm |
void |
setIdleTimeout(long timeout)
Sets the idle close timeout. |
void |
setUseSCTP(Boolean use_sctp)
Change the setting for using SCTP Sets the setting to the spciefied value, which can be null. |
void |
setUseTCP(Boolean use_tcp)
Change the setting for using TCP Sets the setting to the spciefied value, which can be null. |
void |
setWatchdogInterval(long interval)
Sets the desired DWR/DWA interval. |
NodeSettings.PortRange |
TCPPortRange()
Get the source port range for outgoing TCP connections |
void |
TCPPortRange(int min,
int max)
Set the source port range for outgoing TCP connections |
void |
TCPPortRange(NodeSettings.PortRange port_range)
Set the source port range for outgoing TCP connections If the source port range is no tset (default) then the stack will use an ephemeral source port. |
Boolean |
useSCTP()
Returns the setting for using SCTP. |
Boolean |
useTCP()
Returns the setting for using TCP. |
int |
vendorId()
Returns the configured vendor ID |
long |
watchdogInterval()
Returns the desired DWR interval (in milliseconds). |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeSettings(String host_id, String realm, int vendor_id, Capability capabilities, int port, String product_name, int firmware_revision) throws InvalidSettingException
host_id
- The Diameter host identity.vendor_id
- Your IANA-assigned "SMI Network Management Private Enterprise Code"realm
- The Diameter realm.capabilities
- The capabilities of this node.port
- The port to listen on. Use 0 to specify that this node should not listen for incoming connections.product_name
- The name of this product eg. "FooBar gateway"firmware_revision
- The "firmware" revision ie. the version of you product. Use 0 to specify none.
InvalidSettingException
Method Detail |
---|
public String hostId()
public String realm()
public int vendorId()
public Capability capabilities()
public int port()
public String productName()
public int firmwareRevision()
public long watchdogInterval()
public void setWatchdogInterval(long interval) throws InvalidSettingException
interval
- DWR interval in milliseconds
InvalidSettingException
- If the interval is less than 6000 millisecondspublic long idleTimeout()
public void setIdleTimeout(long timeout) throws InvalidSettingException
timeout
- Timeout in milliseconds. If 0 then idle timeout is disabled and connections will be kept open.
InvalidSettingException
- If timeout is negative.public Boolean useTCP()
public void setUseTCP(Boolean use_tcp)
Node
for details}.
use_tcp
- New TCP use setting. Can be null.public Boolean useSCTP()
public void setUseSCTP(Boolean use_sctp)
Node
for details}.
use_sctp
- New SCTP use setting. Can be null.public void TCPPortRange(NodeSettings.PortRange port_range) throws InvalidSettingException
port_range
- A source port range to use for initiating outgoing TCP connections.
InvalidSettingException
public void TCPPortRange(int min, int max) throws InvalidSettingException
InvalidSettingException
TCPPortRange(PortRange)
public NodeSettings.PortRange TCPPortRange()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |