コード例 #1
0
ファイル: PeerImpl.java プロジェクト: endless2010/mobicents
 /** Create instance of class */
 public PeerImpl(
     MutablePeerTableImpl mgr,
     int rating,
     URI remotePeer,
     String ip,
     String portRange,
     IMetaData metaData,
     Configuration config,
     Configuration peerConfig,
     ISessionFactory sessionFactory,
     IFsmFactory fsmFactory,
     ITransportLayerFactory trFactory,
     IMessageParser parser,
     INetwork nWork,
     IOverloadManager oManager,
     boolean attCnn,
     IConnection connection)
     throws InternalException, TransportException {
   super(
       mgr,
       rating,
       remotePeer,
       ip,
       portRange,
       metaData,
       config,
       peerConfig,
       fsmFactory,
       trFactory,
       parser,
       connection);
   // Create specific action context
   manager = mgr;
   isDuplicateProtection = manager.isDuplicateProtection();
   factory = sessionFactory;
   isAttemptConnection = attCnn;
   incConnections = manager.getIncConnections();
   predefinedPeerTable = manager.getPredefinedPeerTable();
   network = nWork;
   ovrManager = oManager;
   // Append fsm statistic
   if (fsm instanceof IStateMachine)
     statistic.appendCounter(((IStateMachine) fsm).getStatistic().getRecords());
 }
コード例 #2
0
ファイル: PeerImpl.java プロジェクト: endless2010/mobicents
 protected void preProcessRequest(IMessage message) {
   if (isDuplicateProtection && message.isRequest())
     manager.saveToDuplicate(message.getDuplicationKey(), message);
 }