|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.slide.common.AbstractServiceBase
Slide Service abstract implementation.
Field Summary | |
protected java.lang.String |
LOG_CHANNEL
|
protected Namespace |
namespace
Namespace. |
protected Scope |
scope
|
Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Constructor Summary | |
AbstractServiceBase()
|
Method Summary | |
boolean |
cacheResults()
Indicates whether or not the objects managed by this service should be cached. |
abstract void |
connect()
Connects to the underlying data source (if any is needed). |
boolean |
connectIfNeeded()
Connects to the service, if we were not previously connected. |
abstract void |
disconnect()
Disconnects from the underlying data source. |
Logger |
getLogger()
Logger accessor. |
void |
initialize(NamespaceAccessToken token)
Initializes service. |
abstract boolean |
isConnected()
This function tells whether or not the service is connected. |
abstract void |
reset()
Deletes service underlying data source, if possible (and meaningful). |
void |
setNamespace(Namespace namespace)
Namespace setter. |
abstract void |
setParameters(java.util.Hashtable parameters)
Initializes the service with a set of parameters. |
void |
setScope(Scope scope)
Set the scope of the store as specified in domain.xml. |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface javax.transaction.xa.XAResource |
commit, end, forget, getTransactionTimeout, isSameRM, prepare, recover, rollback, setTransactionTimeout, start |
Field Detail |
protected java.lang.String LOG_CHANNEL
protected Namespace namespace
protected Scope scope
Constructor Detail |
public AbstractServiceBase()
Method Detail |
public void setScope(Scope scope)
setScope
in interface Service
public void setNamespace(Namespace namespace)
setNamespace
in interface Service
public Logger getLogger()
getLogger
in interface Service
org.apache.slide.common.Service
public abstract void setParameters(java.util.Hashtable parameters) throws ServiceParameterErrorException, ServiceParameterMissingException
setParameters
in interface Service
parameters
- Hashtable containing the parameters' names
and associated valuesServiceParameterErrorException
- Incorrect service parameterServiceParameterMissingException
- Service parameter missingpublic abstract void connect() throws ServiceConnectionFailedException
connect
in interface Service
ServiceConnectionFailedException
- Connection failedpublic abstract void disconnect() throws ServiceDisconnectionFailedException
disconnect
in interface Service
ServiceDisconnectionFailedException
- Disconnection failedpublic void initialize(NamespaceAccessToken token) throws ServiceInitializationFailedException
initialize
in interface Service
token
- Namespace access token, needed if the service needs to
access objects or data within the namespace during its initializationServiceInitializationFailedException
- May throw an exception
if the service has already been initialized beforepublic abstract void reset() throws ServiceResetFailedException
reset
in interface Service
ServiceResetFailedException
- Reset failedpublic abstract boolean isConnected() throws ServiceAccessException
isConnected
in interface Service
ServiceAccessException
- Service access errorpublic boolean connectIfNeeded() throws ServiceConnectionFailedException, ServiceAccessException
connectIfNeeded
in interface Service
ServiceAccessException
- Unspecified service access errorServiceConnectionFailedException
- Connection failedpublic boolean cacheResults()
cacheResults
in interface Service
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |