public static void registerProtocol(final String id,final Protocol protocol){
  if (id == null) {
    throw new IllegalArgumentException("id is null");
  }
  if (protocol == null) {
    throw new IllegalArgumentException("protocol is null");
  }
  PROTOCOLS.put(id,protocol);
}

public static void registerProtocol ( final String id , final Protocol protocol ) { if ( id == null ) { throw new IllegalArgumentException ( "id is null" ) ; } if ( protocol == null ) { throw new IllegalArgumentException ( "protocol is null" ) ; } PROTOCOLS . put ( id , protocol ) ; }
registers a new protocol with the given identifier . if a protocol with the given id already exists it will be overridden . this id is the same one used to retrieve the protocol from getprotocol ( string ) .
