Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


com.bea.wcp.diameter
Class PeerTable

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


public final class PeerTable
extends java.lang.Object

The peer table manages information about configured Diameter peers.


Field Summary
static int DEFAULT_PEER_RETRY_DELAY
          Default connection retry in seconds
static long DEFAULT_REQUEST_TIMEOUT
          Default request timeout in milliseconds
static int DEFAULT_WATCHDOG_TIMEOUT
          Default watchdog timeout in seconds
static int WATCHDOG_TICK_RESOLUTION
          Watchdog period in milliiseconds

 

Method Summary
 void addPeer(Peer peer)
           
 void addPeer(java.lang.String host, java.net.InetAddress addr, int port)
           
 Peer getPeer(java.lang.String host)
           
 int getPeerRetryDelay()
          Returns the time to wait for attempting to reconnect to a failed peer.
 long getRequestTimeout()
          Returns the maximum time to wait for an answer to a request.
 int getWatchdogTimeout()
           
 boolean isAllowDynamicPeers()
           
 void scheduleReconnect(Peer peer)
          Schedules timer task to reconnect to peer after a configured peerRetryDelay (specified as timer "Tc" in RFC3588).
 java.util.TimerTask scheduleWatchdogTick(Peer peer)
          Schedules timer task tick to expire watchdog timer (specified as timer "Tw" in RFC3539).
 void setAllowDynamicPeers(boolean status)
           
 void setPeerRetryDelay(int secs)
          Sets the time to wait before attempting to reconnect to a failed peer.
 void setRequestTimeout(long msec)
          Sets the maximum time to wait for an answer to a request.
 void setWatchdogTimeout(int secs)
          Sets the watchdog timeout Tw
 void start()
           
 void stop()
          Stops all peers

 

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

 

Field Detail

DEFAULT_PEER_RETRY_DELAY

public static final int DEFAULT_PEER_RETRY_DELAY
Default connection retry in seconds
See Also:
Constant Field Values

DEFAULT_REQUEST_TIMEOUT

public static final long DEFAULT_REQUEST_TIMEOUT
Default request timeout in milliseconds
See Also:
Constant Field Values

DEFAULT_WATCHDOG_TIMEOUT

public static final int DEFAULT_WATCHDOG_TIMEOUT
Default watchdog timeout in seconds
See Also:
Constant Field Values

WATCHDOG_TICK_RESOLUTION

public static final int WATCHDOG_TICK_RESOLUTION
Watchdog period in milliiseconds
See Also:
Constant Field Values

Method Detail

getPeer

public Peer getPeer(java.lang.String host)

addPeer

public void addPeer(Peer peer)

addPeer

public void addPeer(java.lang.String host,
                    java.net.InetAddress addr,
                    int port)

start

public void start()

scheduleReconnect

public void scheduleReconnect(Peer peer)
Schedules timer task to reconnect to peer after a configured peerRetryDelay (specified as timer "Tc" in RFC3588). The default is to reconnect after 30 seconds.
Parameters:
peer - the peer to reconnect to after the configured peerRetryDelay

scheduleWatchdogTick

public java.util.TimerTask scheduleWatchdogTick(Peer peer)
Schedules timer task tick to expire watchdog timer (specified as timer "Tw" in RFC3539).
Parameters:
peer - the peer to inform about Tw tick
Returns:
null if timer is not available yet

setPeerRetryDelay

public void setPeerRetryDelay(int secs)
Sets the time to wait before attempting to reconnect to a failed peer.
Parameters:
secs - the peer retry delay in seconds

getPeerRetryDelay

public int getPeerRetryDelay()
Returns the time to wait for attempting to reconnect to a failed peer.
Returns:
the peer retry delay in seconds

setRequestTimeout

public void setRequestTimeout(long msec)
Sets the maximum time to wait for an answer to a request. If no answer is received within the given timeout period, then an UNABLE_TO_DELIVER error answer will generated and delivered to the application.
Parameters:
msec - the request timeout in milliseconds

getRequestTimeout

public long getRequestTimeout()
Returns the maximum time to wait for an answer to a request.
Returns:
the request timeout in milliseconds

setWatchdogTimeout

public void setWatchdogTimeout(int secs)
Sets the watchdog timeout Tw
Parameters:
secs - watchdog timeout Tw

getWatchdogTimeout

public int getWatchdogTimeout()
Returns:
the value of Tw in seconds

stop

public void stop()
Stops all peers

setAllowDynamicPeers

public void setAllowDynamicPeers(boolean status)

isAllowDynamicPeers

public boolean isAllowDynamicPeers()

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.