Skip to content

Commit 625b906

Browse files
committed
deprecate specific methods AbstractDiscoveryLifecycle
1 parent b8ba517 commit 625b906

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/AbstractDiscoveryLifecycle.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ public void setApplicationContext(ApplicationContext applicationContext)
6868
this.environment = this.context.getEnvironment();
6969
}
7070

71+
@Deprecated
7172
protected Environment getEnvironment() {
7273
return environment;
7374
}
7475

76+
@Deprecated
7577
protected AtomicInteger getPort() {
7678
return port;
7779
}
@@ -117,7 +119,9 @@ public void start() {
117119
}
118120
}
119121

122+
@Deprecated
120123
protected abstract int getConfiguredPort();
124+
@Deprecated
121125
protected abstract void setConfiguredPort(int port);
122126

123127
/**
@@ -130,6 +134,7 @@ protected boolean shouldRegisterManagement() {
130134
/**
131135
* @return the object used to configure the registration
132136
*/
137+
@Deprecated
133138
protected abstract Object getConfiguration();
134139

135140

@@ -163,6 +168,7 @@ protected void deregisterManagement() {
163168
/**
164169
* @return the serviceId of the Management Service
165170
*/
171+
@Deprecated
166172
protected String getManagementServiceId() {
167173
// TODO: configurable management suffix
168174
return this.context.getId() + ":management";
@@ -171,6 +177,7 @@ protected String getManagementServiceId() {
171177
/**
172178
* @return the service name of the Management Service
173179
*/
180+
@Deprecated
174181
protected String getManagementServiceName() {
175182
// TODO: configurable management suffix
176183
return getAppName() + ":management";
@@ -179,13 +186,15 @@ protected String getManagementServiceName() {
179186
/**
180187
* @return the management server port
181188
*/
189+
@Deprecated
182190
protected Integer getManagementPort() {
183191
return ManagementServerPortUtils.getPort(this.context);
184192
}
185193

186194
/**
187195
* @return the app name, currently the spring.application.name property
188196
*/
197+
@Deprecated
189198
protected String getAppName() {
190199
return this.environment.getProperty("spring.application.name", "application");
191200
}
@@ -225,6 +234,7 @@ public int getPhase() {
225234
}
226235

227236
@Override
237+
@Deprecated
228238
public void onApplicationEvent(EmbeddedServletContainerInitializedEvent event) {
229239
// TODO: take SSL into account
230240
// Don't register the management port as THE port

0 commit comments

Comments
 (0)