public class SingletonHelloServiceV2 extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
defaultMessage
The default message template assigned when the bean is loaded.
|
private static org.slf4j.Logger |
LOG
Static Logger.
|
private MessageFormatter |
messageFormatter
Delegate service.
|
private static String |
UNKNOWN_USERNAME
Constant used by the service when userName is not defined by the client.
|
| Constructor and Description |
|---|
SingletonHelloServiceV2() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
initBean()
Method called by the CDI container when the bean is retrieved from
BeanManager. |
String |
sayHello(String userName)
Service called by client-tier in order to send a welcome message.
|
(package private) void |
tearDown()
Method called by the CDI container before the destruction of the bean from the
BeanManager. |
private static final org.slf4j.Logger LOG
private static final String UNKNOWN_USERNAME
private String defaultMessage
@Inject private MessageFormatter messageFormatter
@PostConstruct void initBean()
BeanManager. See the JSR 250 Callback PostConstruct
annotation.@PreDestroy void tearDown()
BeanManager. See the JSR 250 Callback PreDestroy
annotation.Copyright © 2014 SYDISNET. All rights reserved.