org.jdiameter.api
Interface Peer


public interface Peer

Peer contains everything that is worth knowing about a peer and define some operation for working with this peer.

Version:
1.5.1 Final

Method Summary
 void addPeerStateListener(PeerStateListener listener)
          Append peer state change listener to the peer manager
 void connect()
          Establishes a connection towards a remote peer.
 void disconnect()
          Close the connection to the peer.
 java.util.Set<ApplicationId> getCommonApplications()
           
 long getFirmware()
           
 java.net.InetAddress[] getIPAddresses()
           
 java.lang.String getProductName()
           
 java.lang.String getRealmName()
           
<E> E
getState(java.lang.Class<E> enumc)
          All implementations must support PeerState intrface as argument
 URI getUri()
           
 long getVendorId()
           
 void removePeerStateListener(PeerStateListener listener)
          Remove peer state change listener from the peer manager
 

Method Detail

connect

void connect()
             throws InternalException,
                    java.io.IOException,
                    IllegalDiameterStateException
Establishes a connection towards a remote peer.

Throws:
IllegalDiameterStateException
InternalException
java.io.IOException

disconnect

void disconnect()
                throws InternalException,
                       IllegalDiameterStateException
Close the connection to the peer.

Throws:
IllegalDiameterStateException
InternalException

getState

<E> E getState(java.lang.Class<E> enumc)
All implementations must support PeerState intrface as argument

Returns:
state of peer

getUri

URI getUri()
Returns:
URI of peer

getIPAddresses

java.net.InetAddress[] getIPAddresses()
Returns:
array of peer ip addresses

getRealmName

java.lang.String getRealmName()
Returns:
Realm name of peer

getVendorId

long getVendorId()
Returns:
vendor id of peer stack implimentation

getProductName

java.lang.String getProductName()
Returns:
product name of peer stack implimentation

getFirmware

long getFirmware()
Returns:
firmware version of peer stack implimentation

getCommonApplications

java.util.Set<ApplicationId> getCommonApplications()
Returns:
set of common Application-id of peer;

addPeerStateListener

void addPeerStateListener(PeerStateListener listener)
Append peer state change listener to the peer manager

Parameters:
listener - listener instance

removePeerStateListener

void removePeerStateListener(PeerStateListener listener)
Remove peer state change listener from the peer manager

Parameters:
listener - listener instance


Copyright © 2010. All Rights Reserved.