Class AbstractServiceDefinition

java.lang.Object
org.kuali.rice.ksb.api.bus.support.AbstractServiceDefinition
All Implemented Interfaces:
ServiceDefinition
Direct Known Subclasses:
JavaServiceDefinition, SoapServiceDefinition

public abstract class AbstractServiceDefinition extends Object implements ServiceDefinition
The definition of a service on the service bus.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Constructor Details

    • AbstractServiceDefinition

      protected AbstractServiceDefinition()
  • Method Details

    • isBasicAuthentication

      public boolean isBasicAuthentication()
      Description copied from interface: ServiceDefinition
      Returns whether the service is secured with basic authentication
      Specified by:
      isBasicAuthentication in interface ServiceDefinition
      Returns:
      the basicAuthentication
    • setBasicAuthentication

      public void setBasicAuthentication(boolean basicAuthentication)
      Parameters:
      basicAuthentication - the basicAuthentication to set
    • getService

      public Object getService()
      Description copied from interface: ServiceDefinition
      Return the actual service implementation to publish and export to the service bus.
      Specified by:
      getService in interface ServiceDefinition
      Returns:
      the service to publish
    • setService

      public void setService(Object service)
    • getLocalServiceName

      public String getLocalServiceName()
    • setLocalServiceName

      public void setLocalServiceName(String serviceName)
    • getMessageExceptionHandler

      public String getMessageExceptionHandler()
      Description copied from interface: ServiceDefinition
      Returns the name of the exception handler to invoke whenever messages to this service fail to be sent. If null, the default message exception handler will be used.
      Specified by:
      getMessageExceptionHandler in interface ServiceDefinition
      Returns:
      the name of the message exception handler for this service, or null if the default handler should be used
    • setMessageExceptionHandler

      public void setMessageExceptionHandler(String messageExceptionHandler)
    • getPriority

      public Integer getPriority()
      Description copied from interface: ServiceDefinition
      Returns the processing priority for messages that are sent to this service.
      Specified by:
      getPriority in interface ServiceDefinition
      Returns:
      the message processing priority for this service
    • setPriority

      public void setPriority(Integer priority)
    • isQueue

      public boolean isQueue()
      Description copied from interface: ServiceDefinition
      Return true if this service uses queue-style messaging, false if it uses topic-style messaging.
      Specified by:
      isQueue in interface ServiceDefinition
      Returns:
      true if this service uses queue-style messaging, false if it uses topic-style messaging
    • setQueue

      public void setQueue(boolean queue)
    • getRetryAttempts

      public Integer getRetryAttempts()
      Description copied from interface: ServiceDefinition
      Returns the retry attempts to use when processing messages sent to this service.
      Specified by:
      getRetryAttempts in interface ServiceDefinition
      Returns:
      the retry attempts for this service
    • setRetryAttempts

      public void setRetryAttempts(Integer retryAttempts)
    • getServiceName

      public QName getServiceName()
      Description copied from interface: ServiceDefinition
      Returns the qualified name for this service.
      Specified by:
      getServiceName in interface ServiceDefinition
      Returns:
      the qualified name for this service
    • setServiceName

      public void setServiceName(QName serviceName)
    • getEndpointUrl

      public URL getEndpointUrl()
      Description copied from interface: ServiceDefinition
      Returns the URL of the endpoint which provides this service.
      Specified by:
      getEndpointUrl in interface ServiceDefinition
      Returns:
      the endpoint URL of the service
    • setEndpointUrl

      public void setEndpointUrl(URL endpointUrl)
    • setCredentialsType

      public void setCredentialsType(CredentialsType credentialsType)
    • getCredentialsType

      public CredentialsType getCredentialsType()
      Description copied from interface: ServiceDefinition
      Returns the type of security credentials that should be used when attempting to authorize access to this service.
      Specified by:
      getCredentialsType in interface ServiceDefinition
      Returns:
      the type of security credentials to use when access this service
    • getServiceVersion

      public String getServiceVersion()
      Description copied from interface: ServiceDefinition
      Returns the version of this service.
      Specified by:
      getServiceVersion in interface ServiceDefinition
      Returns:
      the version of this service
    • setServiceVersion

      public void setServiceVersion(String serviceVersion)
    • getApplicationId

      public String getApplicationId()
      Description copied from interface: ServiceDefinition
      Returns the id of the application which owns this service.
      Specified by:
      getApplicationId in interface ServiceDefinition
      Returns:
      the id of the application which owns this service
    • setApplicationId

      public void setApplicationId(String applicationId)
    • getInstanceId

      public String getInstanceId()
      Description copied from interface: ServiceDefinition
      Returns the id of the specific instance of the application which owns this service
      Specified by:
      getInstanceId in interface ServiceDefinition
      Returns:
      the id of the specific instance of the application which owns this service
    • setInstanceId

      public void setInstanceId(String instanceId)
    • getServiceClassLoader

      public ClassLoader getServiceClassLoader()
      Description copied from interface: ServiceDefinition
      Returns the ClassLoader that should be set as the context classloader on the thread prior to any invocations on the service
      Specified by:
      getServiceClassLoader in interface ServiceDefinition
      Returns:
      the classloader for this service
    • setServiceClassLoader

      public void setServiceClassLoader(ClassLoader serviceClassLoader)
    • validate

      public void validate()
      Description copied from interface: ServiceDefinition
      Validates the service definition after creation of the service definition. It's intended that portions of the KSB that handle publication and export of services to the bus will execute this prior to successful export of the service.
      Specified by:
      validate in interface ServiceDefinition
    • establishEndpoint

      public Endpoint establishEndpoint()
      Description copied from interface: ServiceDefinition
      Establishes and returns an Endpoint to this service which generates the ServiceConfiguration for this service definition as well as including the actual service implementation as provided by ServiceDefinition.getService().

      The ServiceDefinition.validate() method should be invoked prior to executing this method in order to ensure that the appropriate internal state for the ServiceDefinition has been established.

      Specified by:
      establishEndpoint in interface ServiceDefinition
      Returns:
      the established endpoint, should never return null
    • configure

      protected abstract ServiceConfiguration configure()
    • getServiceNameSpaceURI

      public String getServiceNameSpaceURI()
    • setServiceNameSpaceURI

      public void setServiceNameSpaceURI(String serviceNameSpaceURI)
    • getMillisToLive

      public Long getMillisToLive()
      Description copied from interface: ServiceDefinition
      Returns the maximum amount of milliseconds a message to this service can live and attempt to be processed successfully by this service before it's forced into processing by it's exception handler.
      Specified by:
      getMillisToLive in interface ServiceDefinition
      Returns:
      the maximum lifetime for this message, if null then this message has an infinite lifetime
    • setMillisToLive

      public void setMillisToLive(Long millisToLive)
    • getBusSecurity

      public Boolean getBusSecurity()
      Description copied from interface: ServiceDefinition
      Returns true if this service is secured by standard KSB security features.
      Specified by:
      getBusSecurity in interface ServiceDefinition
      Returns:
      true if this service is secured, false otherwise
    • setBusSecurity

      public void setBusSecurity(Boolean busSecurity)
    • getServicePath

      public String getServicePath()
      Description copied from interface: ServiceDefinition
      Returns the url path to export the service under.
      Specified by:
      getServicePath in interface ServiceDefinition
      Returns:
      the servicePath
    • setServicePath

      public void setServicePath(String servicePath)
      Parameters:
      servicePath - the servicePath to set
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object