org.jdiameter.server.impl
Class PeerImpl

java.lang.Object
  extended by org.jdiameter.common.impl.controller.AbstractPeer
      extended by org.jdiameter.client.impl.controller.PeerImpl
          extended by org.jdiameter.server.impl.PeerImpl
All Implemented Interfaces:
java.lang.Comparable<Peer>, Peer, IPeer

public class PeerImpl
extends PeerImpl
implements IPeer

Author:
erick.svenson@yahoo.com, Alexandre Mendonca , Bartosz Baranowski

Nested Class Summary
protected  class PeerImpl.LocalActionConext
           
 
Nested classes/interfaces inherited from class org.jdiameter.client.impl.controller.PeerImpl
PeerImpl.ActionContext
 
Field Summary
protected  java.util.Map<java.lang.String,IConnection> incConnections
           
protected  boolean isAttemptConnection
           
protected  boolean isDuplicateProtection
           
protected  boolean isElection
           
protected  INetwork network
           
protected  IOverloadManager ovrManager
           
protected  java.util.Set<java.lang.String> predefinedPeerTable
           
protected  ISessionFactory sessionFactory
           
 
Fields inherited from class org.jdiameter.client.impl.controller.PeerImpl
addresses, commonApplications, connection, connListener, dictionary, firmWare, fsm, hopByHopId, metaData, parser, peerRequests, productName, rating, realmName, router, sessionDataSource, stopping, table, useUriAsFQDN, vendorID
 
Fields inherited from class org.jdiameter.common.impl.controller.AbstractPeer
INT_COMMON_APP_ID, perSecondRecords, statistic, statisticFactory, uid, uri
 
Constructor Summary
PeerImpl(int rating, URI remotePeer, java.lang.String ip, java.lang.String portRange, boolean attCnn, IConnection connection, MutablePeerTableImpl peerTable, IMetaData metaData, Configuration config, Configuration peerConfig, ISessionFactory sessionFactory, IFsmFactory fsmFactory, ITransportLayerFactory trFactory, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory, IMessageParser parser, INetwork nWork, IOverloadManager oManager, ISessionDatasource sessionDataSource)
          Create instance of class
 
Method Summary
 void addIncomingConnection(IConnection conn)
          Add new network connection (wait CER/CEA)
protected  void createPeerStatistics()
           
 IConnection getConnection()
          Return peer connection
 IContext getContext()
          Return action context
 boolean isAttemptConnection()
          Return true if peer must start reconnect procedure
 void notifyOvrManager(IOverloadManager ovrManager)
          Set overload manager
protected  void preProcessRequest(IMessage message)
           
 void setElection(boolean isElection)
          Set result of election
 java.lang.String toString()
           
 
Methods inherited from class org.jdiameter.client.impl.controller.PeerImpl
addConnectionListener, addMessage, addPeerStateListener, addStateChangeListener, connect, disconnect, fillIPAddressTable, getCommonApplicationIds, getCommonApplications, getFirmware, getHopByHopIdentifier, getIPAddresses, getProductName, getRating, getRealmName, getState, getStatistic, getUri, getVendorId, handleMessage, hasValidConnection, isConnected, remAllMessage, remConnectionListener, remMessage, removePeerStateListener, remStateChangeListener, sendErrorAnswer, sendMessage, setRealm
 
Methods inherited from class org.jdiameter.common.impl.controller.AbstractPeer
compareTo, removePeerStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jdiameter.client.api.controller.IPeer
addConnectionListener, addMessage, addStateChangeListener, getHopByHopIdentifier, getRating, getStatistic, handleMessage, hasValidConnection, isConnected, remAllMessage, remConnectionListener, remMessage, remStateChangeListener, sendMessage, setRealm
 
Methods inherited from interface org.jdiameter.api.Peer
addPeerStateListener, connect, disconnect, getCommonApplications, getFirmware, getIPAddresses, getProductName, getRealmName, getState, getUri, getVendorId, removePeerStateListener
 

Field Detail

predefinedPeerTable

protected java.util.Set<java.lang.String> predefinedPeerTable

network

protected INetwork network

ovrManager

protected IOverloadManager ovrManager

sessionFactory

protected ISessionFactory sessionFactory

isDuplicateProtection

protected boolean isDuplicateProtection

isAttemptConnection

protected boolean isAttemptConnection

isElection

protected boolean isElection

incConnections

protected java.util.Map<java.lang.String,IConnection> incConnections
Constructor Detail

PeerImpl

public PeerImpl(int rating,
                URI remotePeer,
                java.lang.String ip,
                java.lang.String portRange,
                boolean attCnn,
                IConnection connection,
                MutablePeerTableImpl peerTable,
                IMetaData metaData,
                Configuration config,
                Configuration peerConfig,
                ISessionFactory sessionFactory,
                IFsmFactory fsmFactory,
                ITransportLayerFactory trFactory,
                IStatisticManager statisticFactory,
                IConcurrentFactory concurrentFactory,
                IMessageParser parser,
                INetwork nWork,
                IOverloadManager oManager,
                ISessionDatasource sessionDataSource)
         throws InternalException,
                TransportException
Create instance of class

Throws:
InternalException
TransportException
Method Detail

createPeerStatistics

protected void createPeerStatistics()
Overrides:
createPeerStatistics in class AbstractPeer

preProcessRequest

protected void preProcessRequest(IMessage message)

isAttemptConnection

public boolean isAttemptConnection()
Description copied from interface: IPeer
Return true if peer must start reconnect procedure

Returns:
true if peer must start reconnect procedure

getContext

public IContext getContext()
Description copied from interface: IPeer
Return action context

Overrides:
getContext in class PeerImpl
Returns:
action context

getConnection

public IConnection getConnection()
Description copied from interface: IPeer
Return peer connection

Returns:
peer connection

addIncomingConnection

public void addIncomingConnection(IConnection conn)
Description copied from interface: IPeer
Add new network connection (wait CER/CEA)

Parameters:
conn - new network connection

setElection

public void setElection(boolean isElection)
Description copied from interface: IPeer
Set result of election

Parameters:
isElection - result of election

notifyOvrManager

public void notifyOvrManager(IOverloadManager ovrManager)
Description copied from interface: IPeer
Set overload manager

Parameters:
ovrManager - overload manager

toString

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


Copyright © 2014. All Rights Reserved.