Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


com.bea.wcp.diameter
Class Node

java.lang.Object
  extended by com.bea.wcp.diameter.Node


public final class Node
extends java.lang.Object

Diameter Node implementation. Support both client and server-based Diameter applications as well as relay applications.


Field Summary
 MessageDebugBean msgDebugBean
           

 

Constructor Summary
Node(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, java.lang.String host, java.lang.String realm, java.net.InetAddress address, int port)
           
Node(com.bea.wcp.diameter.provider.Provider provider, java.lang.String host, java.lang.String realm, java.net.InetAddress address, int port, boolean tls)
           

 

Method Summary
 com.bea.wcp.diameter.transport.Connection connect(Peer peer)
           
static Node createNode(java.io.File configFile)
          Creates a new Diameter Node instance for the specified configuration.
 void deliverToApplication(Message msg)
          Called by provider to deliver message to application with specified id.
 boolean deliverToSession(Message msg, Session session)
          Deliver message to specified session.
 void dispatch(Message msg)
          Dispatch message to session or application.
 void dispatchRelay(Message msg)
          Dispatch message to relay application.
 void dispatchThreadAnswer(Request req, Answer ans)
           
 void execute(java.lang.Runnable task)
           
 Application getApplication(ApplicationId id)
          Returns the application for the specified application identifier.
 Application getApplication(int idNum)
          Returns the application for the specified application id number.
 AppManager getAppManager()
           
 Capabilities getCapabilities()
           
 ConfigurationBean getConfiguration()
          Returns the ConfigurationBean for the node
 java.lang.String getHost()
          Returns the origin host for the node
static Node getInstance()
          Returns the Node instance to use when deserializing session objects.
 java.net.InetAddress getListenAddress()
          Returns the Node listen address
 Peer getPeer(java.lang.String hostId)
           
 PeerTable getPeerTable()
           
 com.bea.wcp.diameter.provider.Provider getProvider()
           
 java.lang.String getRealm()
          Returns the origin realm for the node
 RouteTable getRouteTable()
           
 java.net.SocketAddress getSocketAddress()
           
 int getStateId()
           
 Version getVersion()
           
 boolean isIncludeOriginStateId()
           
 boolean isLocalAnswer(Answer ans)
          Returns true if answer should be processed locally (not relayed).
 boolean isLocalRequest(Request req)
          Check if request should be processed locally (RFC 3588 6.1.4).
 boolean isMsgDebug()
           
 boolean isMsgDebugLogging()
           
 boolean isRunning()
          Returns true if the Node is currently running.
 boolean isSctpEnabled()
           
 boolean isTlsEnabled()
           
static void main(java.lang.String[] args)
          Starts the Diameter Node for the specified command line arguments.
 void setIncludeOriginStateId(boolean enabled)
           
static void setInstance(Node node)
          Sets the Node instance that will be used for deserialization of persistent session objects.
 void setMsgDebug(boolean enabled)
           
 void start()
          Starts the Diameter Node instance.
 void stop()
          Stops the Diameter Node instance.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

msgDebugBean

public MessageDebugBean msgDebugBean

Constructor Detail

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,
            java.lang.String host,
            java.lang.String realm,
            java.net.InetAddress address,
            int port)

Node

public Node(com.bea.wcp.diameter.provider.Provider provider,
            java.lang.String host,
            java.lang.String realm,
            java.net.InetAddress address,
            int port,
            boolean tls)

Node

public Node(com.bea.wcp.diameter.provider.Provider provider)

Method Detail

setInstance

public static void setInstance(Node node)
Sets the Node instance that will be used for deserialization of persistent session objects.

getInstance

public static Node getInstance()
Returns the Node instance to use when deserializing session objects.

createNode

public static Node createNode(java.io.File configFile)
                       throws java.io.IOException,
                              DiameterException
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:
java.io.IOException - if an I/O error occurred reading the configuration
DiameterException - if the Node could not be initialized

getListenAddress

public java.net.InetAddress getListenAddress()
Returns the Node listen address

start

public void start()
           throws java.io.IOException
Starts the Diameter Node instance.
Throws:
java.io.IOException - if an I/O error occurred while starting

stop

public void stop()
          throws java.io.IOException
Stops the Diameter Node instance.
Throws:
java.io.IOException - if an I/O error occurred while stopping the node

isRunning

public boolean isRunning()
Returns true if the Node is currently running.

getHost

public java.lang.String getHost()
Returns the origin host for the node

getRealm

public java.lang.String getRealm()
Returns the origin realm for the node

getVersion

public Version getVersion()

getConfiguration

public ConfigurationBean getConfiguration()
Returns the ConfigurationBean for the node

getStateId

public int getStateId()

getCapabilities

public Capabilities getCapabilities()

getSocketAddress

public java.net.SocketAddress getSocketAddress()

getProvider

public com.bea.wcp.diameter.provider.Provider getProvider()

getPeerTable

public PeerTable getPeerTable()

getAppManager

public AppManager getAppManager()

getRouteTable

public RouteTable getRouteTable()

getPeer

public Peer getPeer(java.lang.String hostId)

isTlsEnabled

public boolean isTlsEnabled()

isSctpEnabled

public boolean isSctpEnabled()

isIncludeOriginStateId

public boolean isIncludeOriginStateId()

setIncludeOriginStateId

public void setIncludeOriginStateId(boolean enabled)

getApplication

public Application getApplication(int idNum)
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

public Application getApplication(ApplicationId id)
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

public boolean isLocalRequest(Request req)
Check if request should be processed locally (RFC 3588 6.1.4).

isLocalAnswer

public boolean isLocalAnswer(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.

dispatch

public void dispatch(Message msg)
              throws java.io.IOException
Dispatch message to session or application.
Parameters:
msg - the request or answer message to dispatch
Throws:
java.io.IOException - if an I/O error occurred during dispatch

dispatchThreadAnswer

public void dispatchThreadAnswer(Request req,
                                 Answer ans)

dispatchRelay

public void dispatchRelay(Message msg)
Dispatch message to relay application.

deliverToSession

public boolean deliverToSession(Message msg,
                                Session session)
Deliver message to specified session. Used during message dispatch, and by server applications to deliver requests to newly created sessions.
Parameters:
msg - the message to be delivered
session - the session to receive the message

deliverToApplication

public void deliverToApplication(Message msg)
Called by provider to deliver message to application with specified id.

connect

public com.bea.wcp.diameter.transport.Connection connect(Peer peer)
                                                  throws java.io.IOException
Throws:
java.io.IOException

isMsgDebug

public boolean isMsgDebug()

setMsgDebug

public void setMsgDebug(boolean enabled)

isMsgDebugLogging

public boolean isMsgDebugLogging()

execute

public void execute(java.lang.Runnable task)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Starts the Diameter Node for the specified command line arguments.
Parameters:
args - Diameter Node command line arguments
Throws:
java.lang.Exception - if an error occurs while starting the node

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.