Package com.bea.wcp.diameter
Class Node
java.lang.Object
com.bea.wcp.diameter.Node
Diameter Node implementation. Support both client and server-based Diameter
applications as well as relay applications.
- Author:
- Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean -
Constructor Summary
ConstructorsConstructorDescriptionNode(com.bea.wcp.diameter.provider.Provider provider) Node(com.bea.wcp.diameter.provider.Provider provider, ConfigurationBean config) Node(com.bea.wcp.diameter.provider.Provider provider, String host, String realm, InetAddress address, int port) Node(com.bea.wcp.diameter.provider.Provider provider, String host, String realm, InetAddress address, int port, boolean tls) Node(com.bea.wcp.diameter.provider.Provider provider, String host, String realm, InetAddress address, int port, boolean tls, boolean sctp) -
Method Summary
Modifier and TypeMethodDescriptioncom.bea.wcp.diameter.transport.Connectionstatic NodecreateNode(File configFile) Creates a new Diameter Node instance for the specified configuration.voidCalled by a provider to deliver a message to application with the specified id.booleandeliverToSession(Message msg, Session session) Delivers a message to a specified session.voidDispatches a message to a session or application.voiddispatchRelay(Message msg) Dispatches a message to relay application.voiddispatchThreadAnswer(Request req, Answer ans) voidgetApplication(int idNum) Returns the application for the specified application id number.Returns the application for the specified application identifier.String[]Returns the ConfigurationBean for the nodegetHost()Returns the origin host for the nodestatic NodeReturns the Node instance to use when deserializing session objects.char[]Returns the Node listen addressgetPeerWithoutCreation(String hostId) com.bea.wcp.diameter.provider.ProvidergetRealm()Returns the origin realm for the nodeintbooleanbooleanisLocalAnswer(Answer ans) Returns true if answer should be processed locally (not relayed). 6.2.2 If the last Proxy-Info AVP in the message is targeted to the local Diameter server, the AVP MUST be removed before the answer is forwarded.booleanisLocalRequest(Request req) Checks if request should be processed locally (RFC 3588 6.1.4).booleanbooleanbooleanReturns true if the Node is currently running.booleanbooleanstatic voidStarts the Diameter Node for the specified command line arguments.voidsetCipherSuites(String[] sslCipherSuites) voidsetIncludeOriginStateId(boolean enabled) static voidsetInstance(Node node) Sets the Node instance that will be used for deserialization of persistent session objects.voidsetKeyStore(KeyStore keyStore) voidsetKeyStorePasswd(char[] password) voidsetMsgDebug(boolean enabled) voidsetTrustStore(KeyStore trustStore) voidstart()Starts the Diameter Node instance.voidstop()Stops the Diameter Node instance.
-
Field Details
-
msgDebugBean
-
DEFAULT_VALIDATE_PEER_ADDRESS
public static final boolean DEFAULT_VALIDATE_PEER_ADDRESS- See Also:
-
-
Constructor Details
-
Node
public Node(com.bea.wcp.diameter.provider.Provider provider, ConfigurationBean config) throws DiameterException - Throws:
DiameterException
-
Node
public Node(com.bea.wcp.diameter.provider.Provider provider, String host, String realm, InetAddress address, int port) -
Node
public Node(com.bea.wcp.diameter.provider.Provider provider, String host, String realm, InetAddress address, int port, boolean tls) -
Node
public Node(com.bea.wcp.diameter.provider.Provider provider, String host, String realm, InetAddress address, int port, boolean tls, boolean sctp) -
Node
public Node(com.bea.wcp.diameter.provider.Provider provider)
-
-
Method Details
-
setInstance
Sets the Node instance that will be used for deserialization of persistent session objects. -
getInstance
Returns the Node instance to use when deserializing session objects. -
createNode
Creates a new Diameter Node instance for the specified configuration. Used to start a Diameter node in standalone mode for testing.- Parameters:
configFile- the diameter.xml configuration file- Returns:
- the Diameter Node instance
- Throws:
IOException- if an I/O error occurred reading the configurationDiameterException- if the Node could not be initialized
-
getListenAddress
Returns the Node listen address -
start
Starts the Diameter Node instance.- Throws:
IOException- if an I/O error occurred while starting
-
stop
Stops the Diameter Node instance.- Throws:
IOException- if an I/O error occurred while stopping the node
-
isRunning
public boolean isRunning()Returns true if the Node is currently running. -
getHost
Returns the origin host for the node -
getRealm
Returns the origin realm for the node -
getVersion
-
getConfiguration
Returns the ConfigurationBean for the node -
getStateId
public int getStateId() -
getCapabilities
-
getSocketAddress
-
getSocketAddressList
-
getProvider
public com.bea.wcp.diameter.provider.Provider getProvider() -
getPeerTable
-
getAppManager
-
getRouteTable
-
getPeer
-
getPeerWithoutCreation
-
listPeers
-
getKeyStore
-
getTrustStore
-
getKeyStorePasswd
public char[] getKeyStorePasswd() -
setKeyStore
-
setTrustStore
-
setKeyStorePasswd
public void setKeyStorePasswd(char[] password) -
setCipherSuites
-
getCipherSuites
-
isTlsEnabled
public boolean isTlsEnabled() -
isSctpEnabled
public boolean isSctpEnabled() -
isIncludeOriginStateId
public boolean isIncludeOriginStateId() -
setIncludeOriginStateId
public void setIncludeOriginStateId(boolean enabled) -
getApplication
Returns the application for the specified application id number.- Parameters:
idNum- the application's numeric identifier- Returns:
- the corresponding Application, or null if not found
-
getApplication
Returns the application for the specified application identifier.- Parameters:
id- the ApplicationId for the application- Returns:
- the corresponding Application, or null if not found
-
isLocalRequest
Checks if request should be processed locally (RFC 3588 6.1.4). -
isLocalAnswer
Returns true if answer should be processed locally (not relayed). 6.2.2 If the last Proxy-Info AVP in the message is targeted to the local Diameter server, the AVP MUST be removed before the answer is forwarded. -
dispatch
Dispatches a message to a session or application.- Parameters:
msg- the request or answer message to dispatch- Throws:
IOException- if an I/O error occurred during dispatch
-
dispatchThreadAnswer
-
dispatchRelay
Dispatches a message to relay application. -
deliverToSession
Delivers a message to a specified session. Used during message dispatch, and by server applications to deliver requests to newly created sessions.- Parameters:
msg- the message to be deliveredsession- the session to receive the message
-
deliverToApplication
Called by a provider to deliver a message to application with the specified id. -
connect
- Throws:
IOException
-
isMsgDebug
public boolean isMsgDebug() -
setMsgDebug
public void setMsgDebug(boolean enabled) -
isMsgDebugLogging
public boolean isMsgDebugLogging() -
execute
-
main
Starts the Diameter Node for the specified command line arguments.- Parameters:
args- Diameter Node command line arguments- Throws:
Exception- if an error occurs while starting the node
-