public interface ServiceFactory
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TIMEOUT_MS |
static org.gatein.common.util.Version |
WSRP1 |
static org.gatein.common.util.Version |
WSRP2 |
| Modifier and Type | Method and Description |
|---|---|
void |
enableWSS(boolean enable)
Specifies whether WS-Security (WSS) is activated when accessing the services held by this ServiceFactory.
|
MarkupService |
getMarkupService() |
PortletManagementService |
getPortletManagementService() |
RegistrationService |
getRegistrationService() |
<T> T |
getService(Class<T> clazz)
Generic, typesafe version of the get*Service methods.
|
ServiceDescriptionService |
getServiceDescriptionService() |
String |
getWsdlDefinitionURL()
Retrieves the current String representation of the remote producer's WSDL URL.
|
int |
getWSOperationTimeOut()
Retrieves the current number of milliseconds this factory waits before deciding that a WS operation has timed out.
|
org.gatein.common.util.Version |
getWSRPVersion()
Returns the WSRP version of the remote service that this ServiceFactory connects to or
null if the
ServiceFactory is not available. |
boolean |
isAvailable()
Determines whether or not this ServiceFactory is able to provide services.
|
boolean |
isFailed()
Determines whether or not this ServiceFactory is in a permanent state of failure which cannot be recovered from
without user intervention.
|
boolean |
isWSSAvailable()
Determines whether WS-Security is configured and available to be enabled on this ServiceFactory.
|
boolean |
isWSSEnabled()
Retrieves whether WSS is enabled or not on this ServiceFactory
|
boolean |
refresh(boolean force)
Refreshes (if needed) the information held by this factory from the producer's WSDL.
|
void |
setWsdlDefinitionURL(String wsdlDefinitionURL)
Specifies the URL of the WSDL that needs to be analyzed for WSRP service publication.
|
void |
setWSOperationTimeOut(int msBeforeTimeOut)
Specifies how many milliseconds this factory waits before deciding a WS operation is considered as having timed out.
|
void |
start()
Performs initialization of this ServiceFactory based on available connection metadata.
|
void |
stop()
Performs any clean-up operation needed when this factory is being shutdown.
|
static final int DEFAULT_TIMEOUT_MS
static final org.gatein.common.util.Version WSRP2
static final org.gatein.common.util.Version WSRP1
<T> T getService(Class<T> clazz) throws Exception
T - the generic type of the service we're trying to retrieveclazz - the expected class of the service we're trying to retrieveException - if the service couldn't be initialized or retrievedboolean isAvailable()
isFailed() status.true if this ServiceFactory is ready to provide services, false otherwise.boolean isFailed()
true if this ServiceFactory is not configured properly, false otherwise.void start()
throws Exception
Exception - if initialization and connection to the remote service couldn't be performed.void stop()
void setWsdlDefinitionURL(String wsdlDefinitionURL)
wsdlDefinitionURL - a String representation of the URL of the remote producer's WSDLString getWsdlDefinitionURL()
void setWSOperationTimeOut(int msBeforeTimeOut)
msBeforeTimeOut - number of milliseconds to wait for a WS operation to return before timing out. Will be set
to DEFAULT_TIMEOUT_MS if negative.int getWSOperationTimeOut()
ServiceDescriptionService getServiceDescriptionService() throws Exception
ExceptionMarkupService getMarkupService() throws Exception
ExceptionPortletManagementService getPortletManagementService() throws Exception
ExceptionRegistrationService getRegistrationService() throws Exception
Exceptionorg.gatein.common.util.Version getWSRPVersion()
null if the
ServiceFactory is not available.boolean refresh(boolean force)
throws Exception
force - whether or not to force the refresh (i.e. retrieval and parsing of the WSDL information), regardless of potential cachetrue if a refresh occurred as a result of this operation, false otherwiseExceptionvoid enableWSS(boolean enable)
enable - true to activate WS-Security, false to disable itboolean isWSSEnabled()
true if WSS is enable for this ServiceFactory, false otherwiseboolean isWSSAvailable()
true.true if WS-Security is configured and available, false otherwiseCopyright © 2006-2014 GateIn. All Rights Reserved.