ca.infoway.messagebuilder.xml.service
Class MessageDefinitionServiceFactory

Package class diagram package MessageDefinitionServiceFactory
java.lang.Object
  extended by ca.infoway.messagebuilder.service.ServiceFactory<MessageDefinitionService>
      extended by ca.infoway.messagebuilder.xml.service.MessageDefinitionServiceFactory

public class MessageDefinitionServiceFactory
extends ServiceFactory<MessageDefinitionService>

The message defintion service factory provides a list of all message definitions that are available from the classpath.

Author:
Intelliware Development

Constructor Summary
MessageDefinitionServiceFactory()
          Standard constructor.
 
Method Summary
protected  MessageDefinitionService chooseImplementationOfService(List<MessageDefinitionService> services)
          Choose an implementation of a service, based on several options.
 MessageDefinitionService create()
          Create an instance of the message definition service.
protected  MessageDefinitionService createTrivialService()
          Create a trivial service if no other option exists.
protected  List<MessageDefinitionService> getServices(Enumeration<URL> resources)
          Find all implementations of the message definition service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDefinitionServiceFactory

public MessageDefinitionServiceFactory()

Standard constructor.

Method Detail

chooseImplementationOfService

protected MessageDefinitionService chooseImplementationOfService(List<MessageDefinitionService> services)
Description copied from class: ServiceFactory

Choose an implementation of a service, based on several options.

Specified by:
chooseImplementationOfService in class ServiceFactory<MessageDefinitionService>
Returns:
- the instance of the service.

createTrivialService

protected MessageDefinitionService createTrivialService()
Description copied from class: ServiceFactory

Create a trivial service if no other option exists.

Specified by:
createTrivialService in class ServiceFactory<MessageDefinitionService>
Returns:
- the trivial service.

create

public MessageDefinitionService create()

Create an instance of the message definition service.

Overrides:
create in class ServiceFactory<MessageDefinitionService>
Returns:
the message definition service

getServices

protected List<MessageDefinitionService> getServices(Enumeration<URL> resources)
                                              throws IOException
Description copied from class: ServiceFactory

Find all implementations of the message definition service.

Overrides:
getServices in class ServiceFactory<MessageDefinitionService>
Parameters:
resources - - an enumeration of all the URLs to service files
Returns:
- a list of instances that implement the service interface.
Throws:
IOException - - if any resource cannot be accessed.


Copyright © 2013. All Rights Reserved.