public interface ServiceClient
ClientFactory, then invoke ClientFactory.getClient(Class) to get the instance
of this class.ServiceClient with annotation
SofaClientFactory.| Modifier and Type | Method and Description |
|---|---|
void |
removeService(Class<?> interfaceClass,
int millisecondsToDelay)
Equivalent to
removeService(Class, String, int) except that the uniqueId parameter is
default to an empty string. |
void |
removeService(Class<?> interfaceClass,
String uniqueId,
int millisecondsToDelay)
Remove a service component from SOFA runtime.
|
void |
service(ServiceParam serviceParam)
Creating a SOFA service, sample usage:
|
void service(ServiceParam serviceParam)
ServiceParam serviceParam = new ServiceParam(); SampleService sampleService = new SampleServiceImpl(); serviceParam.setInstance(sampleService); serviceClient.service(serviceParam);
serviceParam - The service parameter used to create a SOFA service.void removeService(Class<?> interfaceClass, int millisecondsToDelay)
removeService(Class, String, int) except that the uniqueId parameter is
default to an empty string.interfaceClass - the interface type to be removedmillisecondsToDelay - after the specified time, then service would be removedvoid removeService(Class<?> interfaceClass, String uniqueId, int millisecondsToDelay)
interfaceClass - the interface type of the service componentuniqueId - the uniqueId of the service componentmillisecondsToDelay - milliseconds to delay while remove a service component, only non-negative value is
accepted. it is useful when remove a RPC service component since remove registry info from config server is a
async-procedureCopyright © 2021. All rights reserved.