Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.slide.common
Interface Service  view Service download Service.java

All Superinterfaces:
javax.transaction.xa.XAResource
All Known Implementing Classes:
AbstractService, AbstractServiceBase, AbstractSimpleService, AbstractXAService, AbstractXAServiceBase

public interface Service
extends javax.transaction.xa.XAResource

Slide Service interface.

Version:
$Revision: 1.14 $

Field Summary
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Method Summary
 boolean cacheResults()
          Idicates whether or not the objects managed by this service should be cached.
 void connect()
          Connects to the underlying data source (if any is needed).
 void connect(org.apache.slide.authenticate.CredentialsToken crdtoken)
          Connects to the underlying data source (if any is needed).
 boolean connectIfNeeded()
          Deprecated.  
 boolean connectIfNeeded(org.apache.slide.authenticate.CredentialsToken crdtoken)
          Connects to the service, if we were not previously connected.
 void disconnect()
          Disconnects from the underlying data source.
 org.apache.slide.util.logger.Logger getLogger()
          Get logger associated with the service.
 void initialize(NamespaceAccessToken token)
          Initializes service.
 boolean isConnected()
          This function tells whether or not the service is connected.
 void reset()
          Deletes service underlying data source, if possible (and meaningful).
 void setNamespace(Namespace namespace)
          Namespace setter.
 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 interface javax.transaction.xa.XAResource
commit, end, forget, getTransactionTimeout, isSameRM, prepare, recover, rollback, setTransactionTimeout, start
 

Method Detail

setScope

public void setScope(Scope scope)
Set the scope of the store as specified in domain.xml.


setNamespace

public void setNamespace(Namespace namespace)
Namespace setter.


setParameters

public void setParameters(java.util.Hashtable parameters)
                   throws ServiceParameterErrorException,
                          ServiceParameterMissingException
Initializes the service with a set of parameters. Those could be :
  • User name, login info
  • Host name on which to connect
  • Remote port
  • JDBC driver whoich is to be used :-)
  • Anything else ...


  • connect

    public void connect(org.apache.slide.authenticate.CredentialsToken crdtoken)
                 throws ServiceConnectionFailedException
    Connects to the underlying data source (if any is needed).


    connect

    public void connect()
                 throws ServiceConnectionFailedException
    Connects to the underlying data source (if any is needed).


    disconnect

    public void disconnect()
                    throws ServiceDisconnectionFailedException
    Disconnects from the underlying data source.


    initialize

    public void initialize(NamespaceAccessToken token)
                    throws ServiceInitializationFailedException
    Initializes service.


    reset

    public void reset()
               throws ServiceResetFailedException
    Deletes service underlying data source, if possible (and meaningful).


    isConnected

    public boolean isConnected()
                        throws ServiceAccessException
    This function tells whether or not the service is connected.


    connectIfNeeded

    public boolean connectIfNeeded(org.apache.slide.authenticate.CredentialsToken crdtoken)
                            throws ServiceConnectionFailedException,
                                   ServiceAccessException
    Connects to the service, if we were not previously connected.


    connectIfNeeded

    public boolean connectIfNeeded()
                            throws ServiceConnectionFailedException,
                                   ServiceAccessException
    Deprecated.  

    Connects to the service, if we were not previously connected.


    cacheResults

    public boolean cacheResults()
    Idicates whether or not the objects managed by this service should be cached. Useful if the service is fast enough, and / or if it already includes its own custom caching mechanism, which might be more efficient than the default one provided by the helpers.


    getLogger

    public org.apache.slide.util.logger.Logger getLogger()
    Get logger associated with the service.