org.jboss.portal.wsrp.services
Class CachingServiceFactory

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.portal.jems.as.system.AbstractJBossService
              extended by org.jboss.portal.wsrp.services.CachingServiceFactory
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ServiceFactory, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class CachingServiceFactory
extends AbstractJBossService
implements ServiceFactory

A service factory that statically cache implementations. It is mainly used in the test environment to void the very expensive creation of SOAP service proxies.

Version:
$Revision: 8784 $
Author:
Julien Viet

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
CachingServiceFactory()
           
 
Method Summary
 ServiceFactory getDelegate()
           
 java.lang.String getMarkupURL()
           
 java.lang.String getPortletManagementURL()
           
 java.lang.String getRegistrationURL()
           
 java.lang.Object getService(java.lang.Class clazz)
           
 java.lang.String getServiceDescriptionURL()
           
 boolean isAvailable()
           
 boolean isFailed()
           
 void setDelegate(ServiceFactory delegate)
           
 void setMarkupURL(java.lang.String markupURL)
           
 void setPortletManagementURL(java.lang.String portletManagementURL)
           
 void setRegistrationURL(java.lang.String registrationURL)
           
 void setServiceDescriptionURL(java.lang.String serviceDescriptionURL)
           
 
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService
create, destroy, getState, getStateString, start, stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, startService, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

CachingServiceFactory

public CachingServiceFactory()
Method Detail

getService

public java.lang.Object getService(java.lang.Class clazz)
                            throws java.lang.Exception
Specified by:
getService in interface ServiceFactory
Throws:
java.lang.Exception

getDelegate

public ServiceFactory getDelegate()

setDelegate

public void setDelegate(ServiceFactory delegate)

isAvailable

public boolean isAvailable()
Specified by:
isAvailable in interface ServiceFactory

isFailed

public boolean isFailed()
Specified by:
isFailed in interface ServiceFactory

getServiceDescriptionURL

public java.lang.String getServiceDescriptionURL()
Specified by:
getServiceDescriptionURL in interface ServiceFactory

getMarkupURL

public java.lang.String getMarkupURL()
Specified by:
getMarkupURL in interface ServiceFactory

getRegistrationURL

public java.lang.String getRegistrationURL()
Specified by:
getRegistrationURL in interface ServiceFactory

getPortletManagementURL

public java.lang.String getPortletManagementURL()
Specified by:
getPortletManagementURL in interface ServiceFactory

setServiceDescriptionURL

public void setServiceDescriptionURL(java.lang.String serviceDescriptionURL)
Specified by:
setServiceDescriptionURL in interface ServiceFactory

setMarkupURL

public void setMarkupURL(java.lang.String markupURL)
Specified by:
setMarkupURL in interface ServiceFactory

setRegistrationURL

public void setRegistrationURL(java.lang.String registrationURL)
Specified by:
setRegistrationURL in interface ServiceFactory

setPortletManagementURL

public void setPortletManagementURL(java.lang.String portletManagementURL)
Specified by:
setPortletManagementURL in interface ServiceFactory