org.apache.jackrabbit.rmi.server
Class ServerQuery

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.apache.jackrabbit.rmi.server.ServerObject
                  extended by org.apache.jackrabbit.rmi.server.ServerQuery
All Implemented Interfaces:
Serializable, Remote, RemoteQuery

public class ServerQuery
extends ServerObject
implements RemoteQuery

Remote adapter for the JCR Query interface. This class makes a local session available as an RMI service using the RemoteQuery interface.

See Also:
Query, RemoteQuery, Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ServerQuery(Query query, RemoteAdapterFactory factory)
          Creates a remote adapter for the given local Query.
 
Method Summary
 RemoteQueryResult execute()
          
 String getLanguage()
          
 String getStatement()
          
 String getStoredQueryPath()
          
 RemoteNode storeAsNode(String absPath)
          
 
Methods inherited from class org.apache.jackrabbit.rmi.server.ServerObject
getFactory, getRemoteItem, getRemoteNode, getRemoteNodeTypeArray, getRepositoryException, getSerialValue, getSerialValues
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerQuery

public ServerQuery(Query query,
                   RemoteAdapterFactory factory)
            throws RemoteException
Creates a remote adapter for the given local Query.

Parameters:
query - local Query
factory - remote adapter factory
Throws:
RemoteException - on RMI errors
Method Detail

execute

public RemoteQueryResult execute()
                          throws RepositoryException,
                                 RemoteException

Specified by:
execute in interface RemoteQuery
Returns:
a QueryResult
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors
See Also:
Query.execute()

getStatement

public String getStatement()
                    throws RemoteException

Specified by:
getStatement in interface RemoteQuery
Returns:
the query statement.
Throws:
RemoteException - on RMI errors
See Also:
Query.getStatement()

getLanguage

public String getLanguage()
                   throws RemoteException

Specified by:
getLanguage in interface RemoteQuery
Returns:
the query language.
Throws:
RemoteException - on RMI errors
See Also:
Query.getLanguage()

getStoredQueryPath

public String getStoredQueryPath()
                          throws RepositoryException,
                                 RemoteException

Specified by:
getStoredQueryPath in interface RemoteQuery
Returns:
path of the node representing this query.
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors
See Also:
Query.getStoredQueryPath()

storeAsNode

public RemoteNode storeAsNode(String absPath)
                       throws RepositoryException,
                              RemoteException

Specified by:
storeAsNode in interface RemoteQuery
Parameters:
absPath - path at which to persist this query.
Returns:
stored node
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors
See Also:
Query.storeAsNode(String)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.