Package org.hcjf.io.net.kubernetes
Class KubernetesSpy
- java.lang.Object
-
- org.hcjf.service.Service<KubernetesSpyConsumer>
-
- org.hcjf.io.net.kubernetes.KubernetesSpy
-
public final class KubernetesSpy extends Service<KubernetesSpyConsumer>
This service spy periodically the kubernetes cluster in order to knows all the updates into the cluster.- Author:
- javaito
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hcjf.service.Service
Service.RunnableWrapperComparator, Service.ShutdownStage, Service.StaticServiceThread, Service.ThreadPoolAgent, Service.ThreadPoolAgentMBean
-
-
Field Summary
-
Fields inherited from class org.hcjf.service.Service
SERVICE_LOG_TAG
-
-
Method Summary
Modifier and Type Method Description static java.lang.StringgetHostName()static KubernetesSpygetInstance()Returns the singleton instance.protected voidinit()Only start the spy task to verifyvoidregisterConsumer(KubernetesSpyConsumer consumer)Register a consumer into the spy.voidunregisterConsumer(KubernetesSpyConsumer consumer)Unregister a consumer of the spy.-
Methods inherited from class org.hcjf.service.Service
call, call, fork, fork, fork, fork, getPriority, getServiceName, run, run, shutdown, shutdownExecutor, systemShutdown
-
-
-
-
Method Detail
-
getInstance
public static KubernetesSpy getInstance()
Returns the singleton instance.- Returns:
- Kubernetes spy instance.
-
getHostName
public static java.lang.String getHostName()
-
registerConsumer
public void registerConsumer(KubernetesSpyConsumer consumer)
Register a consumer into the spy.- Specified by:
registerConsumerin classService<KubernetesSpyConsumer>- Parameters:
consumer- Object with the logic to consume the service.
-
unregisterConsumer
public void unregisterConsumer(KubernetesSpyConsumer consumer)
Unregister a consumer of the spy.- Specified by:
unregisterConsumerin classService<KubernetesSpyConsumer>- Parameters:
consumer- Consumer to unregister.
-
init
protected void init()
Only start the spy task to verify- Overrides:
initin classService<KubernetesSpyConsumer>
-
-