public MobicentsExtendedListeningPoint findMatchingListeningPoint ( String transport , final boolean strict ) { String tmpTransport = transport ; if ( tmpTransport == null ) { tmpTransport = ListeningPoint . UDP ; } Set < MobicentsExtendedListeningPoint > extendedListeningPoints = transportMappingCacheMap . get ( tmpTransport . toLowerCase ( ) ) ; if ( extendedListeningPoints . size ( ) > 0 ) { MobicentsExtendedListeningPoint extendedListeningPoint = extendedListeningPoints . iterator ( ) . next ( ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Found first listening point " + extendedListeningPoint + " with transport " + transport ) ; } return extendedListeningPoint ; } if ( strict ) { return null ; } else { if ( extendedListeningPointList . size ( ) > 0 ) { MobicentsExtendedListeningPoint extendedListeningPoint = extendedListeningPointList . iterator ( ) . next ( ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Found first listening point " + extendedListeningPoint + " with transport " + transport ) ; } return extendedListeningPoint ; } else { throw new RuntimeException ( "no valid sip connectors could be found to create the sip application session !!!" ) ; } } }
Retrieve the first matching listening point corresponding to the transport .