Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


com.bea.wcp.diameter
Class Peer

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


public final class Peer
extends java.lang.Object

Diameter peer implementation based on state machine pattern.


Nested Class Summary
static class Peer.CEA
           
static class Peer.CER
           

 

Field Summary
static int DEFAULT_PORT
           

 

Constructor Summary
Peer(Node node, PeerBean peer)
           
Peer(Node node, java.lang.String host)
          Creates new Peer for an incoming dynamic peer connection.
Peer(Node node, java.lang.String host, java.net.InetAddress addr, int port)
           
Peer(Node node, java.lang.String host, java.net.InetAddress addr, int port, java.lang.String protocol)
           

 

Method Summary
 void close()
           
 void connCER(Request m)
           
 void disconnect(com.bea.wcp.diameter.transport.Connection c)
           
 void elect()
           
 void forward(Message msg)
          Forward request or answer using relay application.
 java.lang.String getHost()
           
 Node getNode()
           
 int getPort()
           
 java.lang.String getProtocol()
          Retrieve the protocol to be used for communication with this peer
 java.lang.String getRealm()
           
 java.net.InetSocketAddress getSocketAddress()
           
 PeerState getState()
           
 void iAccept(com.bea.wcp.diameter.transport.Connection c)
           
 void iDisc()
           
 boolean isClosed()
           
 boolean isOpen()
           
 boolean isStopped()
           
 void processCEA(Peer.CEA cea)
           
 boolean processCER(Peer.CER cer)
           
 void rAccept(com.bea.wcp.diameter.transport.Connection c)
           
 void rDisc()
           
 void receive(Message msg)
           
 com.bea.wcp.diameter.Transaction removeTransaction(int hopByHopId)
           
 void setState(PeerState newState)
           
 void sndCEA()
           
 void sndCEA(Peer.CER cer)
           
 void sndCER()
           
 void sndDWR()
          Sends Device-Watchdog-Request see RFC 3539
 void sndRequest(java.nio.ByteBuffer reqBytes, com.bea.wcp.diameter.Transaction txn)
           
 void start()
           
 void stop()
           
 java.lang.String toString()
           
 boolean waitForClosed(long timeout)
           
 boolean waitForOpen(long timeout)
           
 void watchdogTick()
          Called when watchdog timeout tick expired for this peer

 

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

 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

Constructor Detail

Peer

public Peer(Node node,
            PeerBean peer)

Peer

public Peer(Node node,
            java.lang.String host,
            java.net.InetAddress addr,
            int port)

Peer

public Peer(Node node,
            java.lang.String host,
            java.net.InetAddress addr,
            int port,
            java.lang.String protocol)

Peer

public Peer(Node node,
            java.lang.String host)
Creates new Peer for an incoming dynamic peer connection. In this case, we will not automatically try to connect to the peer ourselves.

Method Detail

start

public void start()

sndRequest

public void sndRequest(java.nio.ByteBuffer reqBytes,
                       com.bea.wcp.diameter.Transaction txn)
                throws java.io.IOException
Throws:
java.io.IOException

removeTransaction

public com.bea.wcp.diameter.Transaction removeTransaction(int hopByHopId)

receive

public void receive(Message msg)
             throws java.io.IOException
Throws:
java.io.IOException

disconnect

public void disconnect(com.bea.wcp.diameter.transport.Connection c)
                throws java.io.IOException
Throws:
java.io.IOException

connCER

public void connCER(Request m)
             throws java.io.IOException
Throws:
java.io.IOException

stop

public void stop()
          throws java.io.IOException
Throws:
java.io.IOException

isStopped

public boolean isStopped()

waitForOpen

public boolean waitForOpen(long timeout)

waitForClosed

public boolean waitForClosed(long timeout)

forward

public void forward(Message msg)
Forward request or answer using relay application.

isOpen

public boolean isOpen()

isClosed

public boolean isClosed()

iAccept

public void iAccept(com.bea.wcp.diameter.transport.Connection c)

rAccept

public void rAccept(com.bea.wcp.diameter.transport.Connection c)

processCER

public boolean processCER(Peer.CER cer)

sndCEA

public void sndCEA()
            throws java.io.IOException
Throws:
java.io.IOException

sndCEA

public void sndCEA(Peer.CER cer)
            throws java.io.IOException
Throws:
java.io.IOException

iDisc

public void iDisc()

rDisc

public void rDisc()

processCEA

public void processCEA(Peer.CEA cea)

elect

public void elect()
           throws java.io.IOException
Throws:
java.io.IOException

sndCER

public void sndCER()
            throws java.io.IOException
Throws:
java.io.IOException

close

public void close()

setState

public void setState(PeerState newState)

getState

public PeerState getState()

getSocketAddress

public java.net.InetSocketAddress getSocketAddress()

getHost

public java.lang.String getHost()

getRealm

public java.lang.String getRealm()

getPort

public int getPort()

getNode

public Node getNode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

watchdogTick

public void watchdogTick()
Called when watchdog timeout tick expired for this peer

sndDWR

public void sndDWR()
            throws java.io.IOException
Sends Device-Watchdog-Request see RFC 3539
Throws:
java.io.IOException - if an I/O error occurred

getProtocol

public java.lang.String getProtocol()
Retrieve the protocol to be used for communication with this peer
Returns:
the protocol to use for communication with this Peer

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.