RichFaces Core API 4.2.2.Final

org.richfaces.application
Interface ServicesFactory


public interface ServicesFactory

Author:
asmirnov@exadel.com

Method Summary
<T> T
getInstance(Class<T> type)
          

Get service instance associated with given type, usually service interface or base abstract class.

 void release()
          

Release all services.

<T> void
setInstance(Class<T> type, T instance)
          

Associate concrete instance with service.

 

Method Detail

getInstance

<T> T getInstance(Class<T> type)
              throws ServiceException

Get service instance associated with given type, usually service interface or base abstract class.

Type Parameters:
T - service type.
Parameters:
type - Base class implemented by service.
Returns:
Current service implementation.
Throws:
ServiceException - if factory cannot create requested service.

setInstance

<T> void setInstance(Class<T> type,
                     T instance)

Associate concrete instance with service.

Type Parameters:
T - service type.
Parameters:
type - Base class implemented by service.
instance - service instance.

release

void release()

Release all services.


RichFaces Core API 4.2.2.Final

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.