public abstract class SharedServiceImpl extends SharedComponent implements Service, EventHandlerAware
| Modifier and Type | Field and Description |
|---|---|
protected EventHandler |
eventHandler |
protected org.slf4j.Logger |
log |
CONFIRMATION_ID_KEY| Constructor and Description |
|---|
SharedServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyService(Service s,
AdaptrisMessage msg) |
void |
changeState(ComponentState newState)
Updates the state for the component
ComponentState. |
boolean |
continueOnFailure()
If true containers should continue and apply the next configured
Service even if this Service throws an
Exception. |
java.lang.String |
createName()
Create a name for any
MleMarker that is generated. |
java.lang.String |
createQualifier()
Create a qualifier for any
MleMarker that is generated. |
protected Service |
deepClone(Service lookedUpService) |
java.lang.Boolean |
getContinueOnFail() |
java.lang.Boolean |
getIsTrackingEndpoint() |
java.lang.String |
getLookupName()
Returns the exact name to bind this object to our
Context. |
java.lang.String |
getUniqueId()
Get the unique-id that is associated with this component.
|
boolean |
isTrackingEndpoint()
Returns true if this should be considered an 'end-point' for tracking
purposes, otherwise false.
|
void |
registerEventHandler(EventHandler eh)
Register the current event handler against this component.
|
void |
requestClose()
Request this component is closed.
|
void |
requestInit()
Request this component is init'd.
|
void |
requestStart()
Request this component is started.
|
void |
requestStop()
Request this component is stopped.
|
ComponentState |
retrieveComponentState()
Returns the last recorde
ComponentState. |
void |
setContinueOnFail(java.lang.Boolean b) |
void |
setIsTrackingEndpoint(java.lang.Boolean b) |
void |
setLookupName(java.lang.String lookupName) |
void |
setUniqueId(java.lang.String uniqueId)
Sets the unique identifier for this
Service. |
triggerJndiLookupclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoService, isBranchingclose, init, start, stopprepareprotected transient EventHandler eventHandler
protected transient org.slf4j.Logger log
protected void applyService(Service s, AdaptrisMessage msg) throws ServiceException
ServiceExceptionprotected Service deepClone(Service lookedUpService) throws CoreException
CoreExceptionpublic java.lang.String getLookupName()
JndiBindableContext.
Specifying a lookupName will not be modified at all when binding to jndi. Therefore you may want to prepend your own chosen subcontexts in this name e.g. "comp/env/"
getLookupName in interface JndiBindablepublic void setLookupName(java.lang.String lookupName)
public void registerEventHandler(EventHandler eh)
EventHandlerAwareregisterEventHandler in interface EventHandlerAwareeh - the event handler currently in use.public void changeState(ComponentState newState)
StateManagedComponent
Updates the state for the component ComponentState.
changeState in interface StateManagedComponentpublic ComponentState retrieveComponentState()
StateManagedComponent
Returns the last recorde ComponentState.
retrieveComponentState in interface StateManagedComponentComponentStatepublic void requestInit()
throws CoreException
StateManagedComponentRequest this component is init'd.
requestInit in interface StateManagedComponentCoreException - wrapping any underlying Exceptionspublic void requestStart()
throws CoreException
StateManagedComponentRequest this component is started.
requestStart in interface StateManagedComponentCoreException - wrapping any underlying Exceptionspublic void requestStop()
StateManagedComponentRequest this component is stopped.
requestStop in interface StateManagedComponentpublic void requestClose()
StateManagedComponentRequest this component is closed.
requestClose in interface StateManagedComponentpublic java.lang.String getUniqueId()
AdaptrisComponentgetUniqueId in interface AdaptrisComponentpublic void setUniqueId(java.lang.String uniqueId)
Service
Sets the unique identifier for this Service. These unique
identifiers are optional but maybe required by some implementations of
ServiceCollection.
setUniqueId in interface ServiceuniqueId - this Service's unique identifierpublic boolean isTrackingEndpoint()
MessageEventGeneratorReturns true if this should be considered an 'end-point' for tracking purposes, otherwise false.
isTrackingEndpoint in interface MessageEventGeneratorpublic boolean continueOnFailure()
Service
If true containers should continue and apply the next configured
Service even if this Service throws an
Exception.
continueOnFailure in interface Servicepublic java.lang.Boolean getContinueOnFail()
public void setContinueOnFail(java.lang.Boolean b)
public java.lang.Boolean getIsTrackingEndpoint()
public void setIsTrackingEndpoint(java.lang.Boolean b)
public java.lang.String createName()
MessageEventGeneratorMleMarker that is generated.
The default implementation is to return the classname of the component in question.
* @return the name for anyMleMarker that is generated.createName in interface MessageEventGeneratorpublic java.lang.String createQualifier()
MessageEventGeneratorMleMarker that is generated.
The default implementation is to return the unique-id of the component in question, or the empty string if not configured
createQualifier in interface MessageEventGeneratorMleMarker that is generated.