change package or protected fields to private

fixes gh-7
This commit is contained in:
Spencer Gibb
2015-01-15 11:57:07 -07:00
parent 7d14db9642
commit bfe651860e
4 changed files with 20 additions and 8 deletions

View File

@@ -30,15 +30,19 @@ import org.springframework.core.env.Environment;
public abstract class AbstractDiscoveryLifecycle implements DiscoveryLifecycle,
ApplicationContextAware {
protected boolean autoStartup = true;
private boolean autoStartup = true;
protected boolean running;
private boolean running;
protected int order = 0;
private int order = 0;
protected ApplicationContext context;
private ApplicationContext context;
protected Environment environment;
private Environment environment;
protected ApplicationContext getContext() {
return context;
}
@Override
public void setApplicationContext(ApplicationContext applicationContext)
@@ -47,6 +51,10 @@ public abstract class AbstractDiscoveryLifecycle implements DiscoveryLifecycle,
this.environment = this.context.getEnvironment();
}
protected Environment getEnvironment() {
return environment;
}
@Override
public boolean isAutoStartup() {
return this.autoStartup;

View File

@@ -39,7 +39,7 @@ public class DiscoveryCompositeHealthIndicator extends CompositeHealthIndicator
}
public static class Holder implements HealthIndicator {
DiscoveryHealthIndicator delegate;
private DiscoveryHealthIndicator delegate;
public Holder(DiscoveryHealthIndicator delegate) {
this.delegate = delegate;
@@ -49,6 +49,10 @@ public class DiscoveryCompositeHealthIndicator extends CompositeHealthIndicator
public Health health() {
return this.delegate.health();
}
protected DiscoveryHealthIndicator getDelegate() {
return delegate;
}
}
}

View File

@@ -79,6 +79,6 @@ public class ManagementServerPortUtils {
|| (port != 0 && port.equals(serverProperties.getPort())) ? SAME
: DIFFERENT);
}
};
}
}

View File

@@ -89,7 +89,7 @@ public class NoopDiscoveryClientConfiguration implements
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
this.context.publishEvent(new InstanceRegisteredEvent<Environment>(this,
this.context.publishEvent(new InstanceRegisteredEvent<>(this,
this.environment));
}