@Override
    public void initialize(InitContext initContext) {
    """
	Construct a default fraction using the default agent URL of http://localhost:8500/.
    """
        if(initContext.projectStage().isPresent()) {
            try {
                StageConfig stageConfig = initContext.projectStage().get();
                String configvalue = stageConfig.resolve(SwarmProperties.CONSUL_URL)
                        .withDefault(null)
                        .getValue();
                this.url = configvalue !=null ? new URL(configvalue):DEFAULT_URL;
            } catch (MalformedURLException e) {
                throw new RuntimeException("Faile to resolve property 'swarm.consul.url'", e);
            }
        }
    }
@Override
    public void initialize(InitContext initContext) {
        if(initContext.projectStage().isPresent()) {
            try {
                StageConfig stageConfig = initContext.projectStage().get();
                String configvalue = stageConfig.resolve(SwarmProperties.CONSUL_URL)
                        .withDefault(null)
                        .getValue();
                this.url = configvalue !=null ? new URL(configvalue):DEFAULT_URL;
            } catch (MalformedURLException e) {
                throw new RuntimeException("Faile to resolve property 'swarm.consul.url'", e);
            }
        }
    }
@ Override public void initialize ( InitContext initContext ) { if ( initContext . projectStage ( ) . isPresent ( ) ) { try { StageConfig stageConfig = initContext . projectStage ( ) . get ( ) ; String configvalue = stageConfig . resolve ( SwarmProperties . CONSUL_URL ) . withDefault ( null ) . getValue ( ) ; this . url = configvalue != null ? new URL ( configvalue ) : DEFAULT_URL ; } catch ( MalformedURLException e ) { throw new RuntimeException ( "Faile to resolve property 'swarm.consul.url'" , e ) ; } } }
Construct a default fraction using the default agent URL of http://localhost:8500/.
Construct a default fraction using the default agent URL of http : // localhost : 8500 / .