org.kuali.rice.ksb.api.bus
Interface ServiceDefinition

All Known Implementing Classes:
AbstractServiceDefinition, JavaServiceDefinition, RestServiceDefinition, SoapServiceDefinition

public interface ServiceDefinition

Defines the common parameters for the publication and export of a service to the ServiceBus and ServiceRegistry. Implementations of this interface may define additional properties that are required for the publication of services of that particular type.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 Endpoint establishEndpoint()
          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 getService().
 String getApplicationId()
          Returns the id of the application which owns this service.
 Boolean getBusSecurity()
          Returns true if this service is secured by standard KSB security features.
 String getCacheManager()
          Returns the name of the cache manager to use.
 CredentialsType getCredentialsType()
          Returns the type of security credentials that should be used when attempting to authorize access to this service.
 URL getEndpointUrl()
          Returns the URL of the endpoint which provides this service.
 String getInstanceId()
          Returns the id of the specific instance of the application which owns this service
 String getMessageExceptionHandler()
          Returns the name of the exception handler to invoke whenever messages to this service fail to be sent.
 Long getMillisToLive()
          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.
 Integer getPriority()
          Returns the processing priority for messages that are sent to this service.
 Integer getRetryAttempts()
          Returns the retry attempts to use when processing messages sent to this service.
 Object getService()
          Return the actual service implementation to publish and export to the service bus.
 ClassLoader getServiceClassLoader()
          Returns the ClassLoader that should be set as the context classloader on the thread prior to any invocations on the service
 QName getServiceName()
          Returns the qualified name for this service.
 String getServicePath()
          Returns the url path to export the service under.
 String getServiceVersion()
          Returns the version of this service.
 String getType()
          Returns the type of this service.
 boolean isQueue()
          Return true if this service uses queue-style messaging, false if it uses topic-style messaging.
 void validate()
          Validates the service definition after creation of the service definition.
 

Method Detail

validate

void validate()
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.

Throws:
ConfigurationException - if this service definition is not configured properly

establishEndpoint

Endpoint establishEndpoint()
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 getService().

The 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.

Returns:
the established endpoint, should never return null

getService

Object getService()
Return the actual service implementation to publish and export to the service bus.

Returns:
the service to publish

getServiceName

QName getServiceName()
Returns the qualified name for this service.

Returns:
the qualified name for this service

getEndpointUrl

URL getEndpointUrl()
Returns the URL of the endpoint which provides this service.

Returns:
the endpoint URL of the service

getServiceClassLoader

ClassLoader getServiceClassLoader()
Returns the ClassLoader that should be set as the context classloader on the thread prior to any invocations on the service

Returns:
the classloader for this service

getServicePath

String getServicePath()
Returns the url path to export the service under.

Returns:
the url path to export the service under

getInstanceId

String getInstanceId()
Returns the id of the specific instance of the application which owns this service

Returns:
the id of the specific instance of the application which owns this service

getApplicationId

String getApplicationId()
Returns the id of the application which owns this service.

Returns:
the id of the application which owns this service

getServiceVersion

String getServiceVersion()
Returns the version of this service.

Returns:
the version of this service

getType

String getType()
Returns the type of this service.

Returns:
the type of this service

isQueue

boolean isQueue()
Return true if this service uses queue-style messaging, false if it uses topic-style messaging.

Returns:
true if this service uses queue-style messaging, false if it uses topic-style messaging

getPriority

Integer getPriority()
Returns the processing priority for messages that are sent to this service.

Returns:
the message processing priority for this service

getRetryAttempts

Integer getRetryAttempts()
Returns the retry attempts to use when processing messages sent to this service.

Returns:
the retry attempts for this service

getMillisToLive

Long getMillisToLive()
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.

Returns:
the maximum lifetime for this message, if null then this message has an infinite lifetime

getMessageExceptionHandler

String getMessageExceptionHandler()
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.

Returns:
the name of the message exception handler for this service, or null if the default handler should be used

getBusSecurity

Boolean getBusSecurity()
Returns true if this service is secured by standard KSB security features.

Returns:
true if this service is secured, false otherwise

getCredentialsType

CredentialsType getCredentialsType()
Returns the type of security credentials that should be used when attempting to authorize access to this service.

Returns:
the type of security credentials to use when access this service

getCacheManager

String getCacheManager()
Returns the name of the cache manager to use. If null or blank then caching is effectively disabled for this service.

Returns:
the cache manager name or null


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.