SdkContext Class
- java.
lang. Object - com.
microsoft. azure. management. resources. fluentcore. utils. SdkContext
- com.
public class SdkContext
The class to contain the common factory methods required for SDK framework.
Method Summary
Modifier and Type | Method and Description |
---|---|
Resource |
getResourceNamerFactory()
Gets the current factory for ResourceNamer. |
Scheduler |
getRxScheduler()
Gets the current Rx Scheduler for the SDK framework. |
String |
randomResourceName(String prefix, int maxLen)
Gets a random name. |
String [] |
randomResourceNames(String prefix, int maxLen, int count)
Generates the specified number of random resource names with the same prefix. |
String |
randomUuid()
Gets a random UUID. |
void |
setDelayProvider(DelayProvider delayProvider)
Function to override the DelayProvider. |
void |
setResourceNamerFactory(ResourceNamerFactory resourceNamerFactory)
Function to override the ResourceNamerFactory. |
void |
setRxScheduler(Scheduler rxScheduler)
Sets the Rx Scheduler for SDK framework, by default is Scheduler.io(). |
void |
sleep(int milliseconds)
Wrapper for sleep, based on delayProvider. |
Method Details
getResourceNamerFactory
public static ResourceNamerFactory getResourceNamerFactory()
Gets the current factory for ResourceNamer.
Returns:
getRxScheduler
public static Scheduler getRxScheduler()
Gets the current Rx Scheduler for the SDK framework.
Returns:
randomResourceName
public static String randomResourceName(String prefix, int maxLen)
Gets a random name.
Parameters:
Returns:
randomResourceNames
public static String [] randomResourceNames(String prefix, int maxLen, int count)
Generates the specified number of random resource names with the same prefix.
Parameters:
Returns:
randomUuid
public static String randomUuid()
Gets a random UUID.
Returns:
setDelayProvider
public static void setDelayProvider(DelayProvider delayProvider)
Function to override the DelayProvider.
Parameters:
setResourceNamerFactory
public static void setResourceNamerFactory(ResourceNamerFactory resourceNamerFactory)
Function to override the ResourceNamerFactory.
Parameters:
setRxScheduler
public static void setRxScheduler(Scheduler rxScheduler)
Sets the Rx Scheduler for SDK framework, by default is Scheduler.io().
Parameters:
sleep
public static void sleep(int milliseconds)
Wrapper for sleep, based on delayProvider.
Parameters:
Applies to
Azure SDK for Java