private void addClientId ( String clientId ) { //Sometimes the client Id will be null. For instance in the case QueueConnectionFactory, there is no default client Id specified in metatype.xml. if ( clientId == null ) return ; //do nothing ConcurrentHashMap < String , Integer > clientIdTable = JmsFactoryFactoryImpl . getClientIdTable ( ) ; if ( clientIdTable . containsKey ( clientId ) ) { clientIdTable . put ( clientId , clientIdTable . get ( clientId ) . intValue ( ) + 1 ) ; } else { clientIdTable . put ( clientId , 1 ) ; } }
If there is no entry for the given Client Id in the clientIdTable then add it with count as 1 . If its already exists then just increment the counter value by 1 .