public class NullProvider extends Object implements ApplicationProvider, NetworkProvider, ServerProvider
| Constructor and Description |
|---|
NullProvider() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAppId() |
String |
getDataCenter() |
String |
getEnvType() |
String |
getHostAddress() |
String |
getHostName() |
String |
getProperty(String name,
String defaultValue)
Return the property value with the given name, or
defaultValue if the name doesn't exist. |
Class<? extends Provider> |
getType() |
void |
initialize()
Initialize the provider
|
void |
initialize(InputStream in)
Initialize the application provider with the specified input stream
|
boolean |
isAppIdSet() |
boolean |
isDataCenterSet() |
boolean |
isEnvTypeSet() |
String |
toString() |
public String getProperty(String name, String defaultValue)
ProviderdefaultValue if the name doesn't exist.getProperty in interface Providername - the property namedefaultValue - the default value when name is not found or any error occurredpublic void initialize()
Providerinitialize in interface Providerpublic String getAppId()
getAppId in interface ApplicationProviderpublic boolean isAppIdSet()
isAppIdSet in interface ApplicationProviderpublic String getEnvType()
getEnvType in interface ServerProvidernull if not setpublic boolean isEnvTypeSet()
isEnvTypeSet in interface ServerProviderpublic String getDataCenter()
getDataCenter in interface ServerProvidernull if not setpublic boolean isDataCenterSet()
isDataCenterSet in interface ServerProviderpublic void initialize(InputStream in)
ApplicationProviderinitialize in interface ApplicationProviderinitialize in interface ServerProviderpublic String getHostAddress()
getHostAddress in interface NetworkProviderpublic String getHostName()
getHostName in interface NetworkProviderCopyright © 2018 Ctrip, Inc.. All rights reserved.