Sonic ESB API

com.sonicsw.esb.service.common.impl
Class AbstractSFCServiceImpl

java.lang.Object
  extended by com.sonicsw.esb.service.common.impl.core.AbstractXQService
      extended by com.sonicsw.esb.service.common.impl.AbstractSFCServiceImpl
All Implemented Interfaces:
SFCService, SFCServiceDescriptor, XQService, XQServiceEx, com.sonicsw.xqimpl.service.InstanceMetricCapable

public abstract class AbstractSFCServiceImpl
extends AbstractXQService
implements XQServiceEx, SFCServiceDescriptor, SFCService


Constructor Summary
AbstractSFCServiceImpl()
          Constructs a service instance.
 
Method Summary
 void destroy()
          Called by the SonicXQ framework when the service is no longer needed.
 void doDestroy()
          Perform service-specific destroy tasks.
 void doInit(SFCInitializationContext context)
          Perform service-specific initialization.
 void doNotCreateApplicationContexts()
          For testing outside of Spring: prevent the creation of any new application contexts.
abstract  void doService(SFCServiceContext context, XQEnvelope envelope)
          Handles an incoming message envelope.
 void doStart()
          Perform service-specific start tasks.
 void doStop()
          Perform service-specific stop tasks.
 java.lang.String getCopyright()
          Provides the copyright string for this service type.
 java.lang.String getDisplayName()
          Provides the display name of this service type.
 java.lang.String getName()
          Provides the name of this service type.
 VersionNumber getVersion()
          Provides the version number for this service type.
 void init(XQInitContext xqInitContext)
          Called by the SonicXQ framework during initialization of this service.
 void service(XQServiceContext xqContext)
          Called by the SonicXQ framework to invoke the service when a message is sent to the service.
 void setApplicationContext(ApplicationContext applicationContext)
           
 void setContainerMetricsHandler(ContainerMetricsHandler metricsHandler)
           
 void setDefaultMetricsProvider(MetricsCapable defaultMetricsProvider)
           
 void setDefaultNotificationsProvider(NotificationsCapable defaultNotificationsProvider)
           
 void setDiagnosticContextFactory(com.sonicsw.esb.service.common.impl.SFCDiagnosticContextFactory diagnosticContextFactory)
           
 void setInitializationContext(SFCInitializationContext initContext)
           
 void setMetricsBuilder(MetricsBuilder metricsBuilder)
           
 void setNotificationsHandler(NotificationsHandler notificationsHandler)
           
 void setServiceContextFactory(SFCServiceContextFactory contextFactory)
           
 void setServiceDelegate(SFCService delegate)
           
 void setServiceDescriptor(SFCServiceDescriptor serviceDescriptor)
           
 void setServiceMetricsHandler(ServiceMetricsHandler metricsHandler)
           
 void start()
          Called by the SonicXQ framework when the service is started.
 void stop()
          Called by the SonicXQ framework when the service is stopped.
 
Methods inherited from class com.sonicsw.esb.service.common.impl.core.AbstractXQService
disableInstanceMetric, enableInstanceMetric, setMetricsRegistrar
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSFCServiceImpl

public AbstractSFCServiceImpl()
Constructs a service instance.

Method Detail

init

public final void init(XQInitContext xqInitContext)
                throws XQServiceException
Description copied from interface: XQService
Called by the SonicXQ framework during initialization of this service. Services should perform any one-time initialization here.

Specified by:
init in interface XQService
Parameters:
xqInitContext - an XQInitContext from which the service can obtain any necessary initialization information
Throws:
XQServiceException - if an error is encountered during initialization

start

public final void start()
Description copied from interface: XQServiceEx
Called by the SonicXQ framework when the service is started. Services should perform any startup tasks here.

Specified by:
start in interface XQServiceEx

stop

public final void stop()
Description copied from interface: XQServiceEx
Called by the SonicXQ framework when the service is stopped. Services should perform any clean-up tasks here.

Specified by:
stop in interface XQServiceEx

destroy

public final void destroy()
Description copied from interface: XQService
Called by the SonicXQ framework when the service is no longer needed. Services should perform any clean-up tasks here.

Specified by:
destroy in interface XQService

service

public final void service(XQServiceContext xqContext)
                   throws XQServiceException
Description copied from interface: XQService
Called by the SonicXQ framework to invoke the service when a message is sent to the service.

Specified by:
service in interface XQService
Parameters:
xqContext - an XQServiceContext from which the service can obtain the operating context (including the sent message)
Throws:
XQServiceException - if an error is encountered during message processing

doInit

public void doInit(SFCInitializationContext context)
            throws XQServiceException
Perform service-specific initialization.

Specified by:
doInit in interface SFCService
Throws:
XQServiceException

doStart

public void doStart()
             throws XQServiceException
Perform service-specific start tasks.

Specified by:
doStart in interface SFCService
Throws:
XQServiceException

doStop

public void doStop()
            throws XQServiceException
Perform service-specific stop tasks.

Specified by:
doStop in interface SFCService
Throws:
XQServiceException

doDestroy

public void doDestroy()
               throws XQServiceException
Perform service-specific destroy tasks.

Specified by:
doDestroy in interface SFCService
Throws:
XQServiceException

doService

public abstract void doService(SFCServiceContext context,
                               XQEnvelope envelope)
                        throws XQServiceException
Handles an incoming message envelope.

Specified by:
doService in interface SFCService
Throws:
XQServiceException

getName

public java.lang.String getName()
Description copied from interface: SFCServiceDescriptor
Provides the name of this service type.

Specified by:
getName in interface SFCServiceDescriptor

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: SFCServiceDescriptor
Provides the display name of this service type.

Specified by:
getDisplayName in interface SFCServiceDescriptor

getVersion

public VersionNumber getVersion()
Description copied from interface: SFCServiceDescriptor
Provides the version number for this service type.

Specified by:
getVersion in interface SFCServiceDescriptor

getCopyright

public java.lang.String getCopyright()
Description copied from interface: SFCServiceDescriptor
Provides the copyright string for this service type.

Specified by:
getCopyright in interface SFCServiceDescriptor

setInitializationContext

public void setInitializationContext(SFCInitializationContext initContext)

setServiceContextFactory

public void setServiceContextFactory(SFCServiceContextFactory contextFactory)

setContainerMetricsHandler

public void setContainerMetricsHandler(ContainerMetricsHandler metricsHandler)

setServiceMetricsHandler

public void setServiceMetricsHandler(ServiceMetricsHandler metricsHandler)

setNotificationsHandler

public void setNotificationsHandler(NotificationsHandler notificationsHandler)

setServiceDescriptor

public void setServiceDescriptor(SFCServiceDescriptor serviceDescriptor)

setDiagnosticContextFactory

public void setDiagnosticContextFactory(com.sonicsw.esb.service.common.impl.SFCDiagnosticContextFactory diagnosticContextFactory)

setDefaultMetricsProvider

public void setDefaultMetricsProvider(MetricsCapable defaultMetricsProvider)

setDefaultNotificationsProvider

public void setDefaultNotificationsProvider(NotificationsCapable defaultNotificationsProvider)

setMetricsBuilder

public void setMetricsBuilder(MetricsBuilder metricsBuilder)

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Throws:
BeansException

setServiceDelegate

public void setServiceDelegate(SFCService delegate)

doNotCreateApplicationContexts

public final void doNotCreateApplicationContexts()
For testing outside of Spring: prevent the creation of any new application contexts.


Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.