void registerConnection ( ConnectionManager cm , ConnectionListener cl , Object c ) { if ( cmToCl == null ) cmToCl = new HashMap < ConnectionManager , List < ConnectionListener > > ( ) ; List < ConnectionListener > l = cmToCl . get ( cm ) ; if ( l == null ) l = new ArrayList < ConnectionListener > ( 1 ) ; l . add ( cl ) ; cmToCl . put ( cm , l ) ; if ( clToC == null ) clToC = new HashMap < ConnectionListener , List < Object > > ( ) ; List < Object > connections = clToC . get ( cl ) ; if ( connections == null ) connections = new ArrayList < Object > ( 1 ) ; connections . add ( c ) ; clToC . put ( cl , connections ) ; }
Register a connection