public class DefaultServiceProxyAdvice<SERVICE_INTERFACE> extends Object implements ServiceProxyInternal<SERVICE_INTERFACE>
| Modifier and Type | Field and Description |
|---|---|
protected String |
serviceEndpointId |
protected Class<SERVICE_INTERFACE> |
serviceInterface |
| Constructor and Description |
|---|
DefaultServiceProxyAdvice(DefaultServiceRegistry.ServiceEndpointState serviceEndpointState,
Class<SERVICE_INTERFACE> serviceInterface) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addServiceListener(ServiceListener<SERVICE_INTERFACE> listener)
Adds the given listener with a weak reference
|
SERVICE_INTERFACE |
get() |
int |
getListenerCount() |
String |
getServiceEndpointId() |
Class<?> |
getServiceImplementationClass()
the concrete class of the service instance that has been registered
|
Class<SERVICE_INTERFACE> |
getServiceInterface() |
boolean |
isServiceAvailable() |
void |
onServiceAvailable()
called if any service has been made available for the respective serviceEndpointId
|
void |
onServiceUnavailable()
called if a service has been removed from the respective serviceEndpointId
|
boolean |
removeServiceListener(ServiceListener<SERVICE_INTERFACE> listener) |
void |
setProxy(ServiceProxyInternal<SERVICE_INTERFACE> proxy) |
String |
toString() |
protected final Class<SERVICE_INTERFACE> serviceInterface
protected final String serviceEndpointId
public DefaultServiceProxyAdvice(DefaultServiceRegistry.ServiceEndpointState serviceEndpointState, Class<SERVICE_INTERFACE> serviceInterface)
public boolean addServiceListener(ServiceListener<SERVICE_INTERFACE> listener)
ServiceProxyaddServiceListener in interface ServiceProxy<SERVICE_INTERFACE>public SERVICE_INTERFACE get()
get in interface ServiceProxy<SERVICE_INTERFACE>public int getListenerCount()
getListenerCount in interface ServiceProxyInternal<SERVICE_INTERFACE>public String getServiceEndpointId()
getServiceEndpointId in interface ServiceProxy<SERVICE_INTERFACE>public Class<?> getServiceImplementationClass()
ServiceProxygetServiceImplementationClass in interface ServiceProxy<SERVICE_INTERFACE>public Class<SERVICE_INTERFACE> getServiceInterface()
getServiceInterface in interface ServiceProxy<SERVICE_INTERFACE>public boolean isServiceAvailable()
isServiceAvailable in interface ServiceProxy<SERVICE_INTERFACE>public void onServiceAvailable()
ServiceProxyInternalonServiceAvailable in interface ServiceProxyInternal<SERVICE_INTERFACE>public void onServiceUnavailable()
ServiceProxyInternalonServiceUnavailable in interface ServiceProxyInternal<SERVICE_INTERFACE>public boolean removeServiceListener(ServiceListener<SERVICE_INTERFACE> listener)
removeServiceListener in interface ServiceProxy<SERVICE_INTERFACE>public void setProxy(ServiceProxyInternal<SERVICE_INTERFACE> proxy)
Copyright © 2010–2021 Vegard IT GmbH, Germany. All rights reserved.