Package com.alibaba.cloud.nacos.registry
Class NacosAutoServiceRegistration
java.lang.Object
org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.cloud.client.serviceregistry.AutoServiceRegistration,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
public class NacosAutoServiceRegistration
extends org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
- Author:
- xiaojing, Mercy
-
Constructor Summary
ConstructorsConstructorDescriptionNacosAutoServiceRegistration(org.springframework.cloud.client.serviceregistry.ServiceRegistry<org.springframework.cloud.client.serviceregistry.Registration> serviceRegistry, org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties autoServiceRegistrationProperties, NacosRegistration registration) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected Objectprotected NacosRegistrationprotected NacosRegistrationprotected booleanvoidprotected voidregister()protected voidvoidsetPort(int port) Deprecated.Methods inherited from class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration
bind, deregister, deregisterManagement, destroy, getContext, getEnvironment, getManagementPort, getManagementServiceId, getManagementServiceName, getOrder, getPhase, getPort, getRunning, getServiceRegistry, isAutoStartup, isRunning, onApplicationEvent, setApplicationContext, shouldRegisterManagement, start, stop
-
Constructor Details
-
NacosAutoServiceRegistration
public NacosAutoServiceRegistration(org.springframework.cloud.client.serviceregistry.ServiceRegistry<org.springframework.cloud.client.serviceregistry.Registration> serviceRegistry, org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties autoServiceRegistrationProperties, NacosRegistration registration)
-
-
Method Details
-
setPort
Deprecated. -
getRegistration
- Specified by:
getRegistrationin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
-
getManagementRegistration
- Specified by:
getManagementRegistrationin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
-
register
protected void register()- Overrides:
registerin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
-
registerManagement
protected void registerManagement()- Overrides:
registerManagementin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
-
getConfiguration
- Specified by:
getConfigurationin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
-
isEnabled
protected boolean isEnabled()- Specified by:
isEnabledin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
-
getAppName
- Overrides:
getAppNamein classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
-
onNacosDiscoveryInfoChangedEvent
-