Package org.hcjf.names
Class Naming
- java.lang.Object
-
- org.hcjf.service.Service<NamingConsumer>
-
- org.hcjf.names.Naming
-
public final class Naming extends Service<NamingConsumer>
Naming service class.- 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 Modifier and Type Field Description static java.lang.StringNAMING_LOG_TAG-
Fields inherited from class org.hcjf.service.Service
SERVICE_LOG_TAG
-
-
Method Summary
Modifier and Type Method Description static voidaddNamingConsumer(NamingConsumer consumer)Add a new consumer into the service.static java.lang.Stringnormalize(java.lang.String implName, java.lang.String value)Normalize the value using the specific naming implementation.voidregisterConsumer(NamingConsumer consumer)This method register the consumer in the service.voidunregisterConsumer(NamingConsumer consumer)Unregister the service consumer.-
Methods inherited from class org.hcjf.service.Service
call, call, fork, fork, fork, fork, getPriority, getServiceName, init, run, run, shutdown, shutdownExecutor, systemShutdown
-
-
-
-
Field Detail
-
NAMING_LOG_TAG
public static final java.lang.String NAMING_LOG_TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerConsumer
public void registerConsumer(NamingConsumer consumer)
This method register the consumer in the service.- Specified by:
registerConsumerin classService<NamingConsumer>- Parameters:
consumer- Object with the logic to consume the service.- Throws:
java.lang.RuntimeException- It contains exceptions generated by the particular logic of each implementation.
-
unregisterConsumer
public void unregisterConsumer(NamingConsumer consumer)
Unregister the service consumer.- Specified by:
unregisterConsumerin classService<NamingConsumer>- Parameters:
consumer- Consumer to unregister.
-
addNamingConsumer
public static void addNamingConsumer(NamingConsumer consumer)
Add a new consumer into the service.- Parameters:
consumer- Naming consumer.
-
normalize
public static java.lang.String normalize(java.lang.String implName, java.lang.String value)Normalize the value using the specific naming implementation.- Parameters:
implName- Implementation name.value- Value to normalize.- Returns:
- Normalized value.
-
-