public static int mapPort ( Map < Integer , Integer > mapping , int port ) { Integer mappedPort = mapping . get ( port ) ; if ( mappedPort == null ) throw new RuntimeException ( "Could not map port " + port ) ; return mappedPort ; }
Looks up a corresponding port number from a port mapping .