public static synchronized void set ( Chameleon chameleon ) { if ( INSTANCE != null && chameleon != null ) { throw new IllegalStateException ( "A Chameleon instance is already stored" ) ; } INSTANCE = chameleon ; if ( chameleon == null ) { // Reset metadata HOST_NAME = null ; HTTP_PORT = - 1 ; HTTPS_PORT = - 1 ; } }
Stores a reference on a running chameleon .