Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.joseki.server
Class Dispatcher

    java.lang.Object
      org.joseki.server.Dispatcher

public class Dispatcher
extends java.lang.Object

The main operation engine class. The dispatcher route requests to operation processors and keeps the mapping from URI to model.

Version:
  $Id: Dispatcher.java,v 1.9 2004/04/30 14:13:13 andy_seaborne Exp $
Author:
  Andy Seaborne

Constructor Summary
`Dispatcher()` Create a Dispatcher
`Dispatcher(Dispatcher queryDispatcher)` Create a Dispatcher that will call another if it can not handle the request

Method Summary
`void` | `addModelSource(ModelSource aModel, java.lang.String uri)`
`void` | `addProcessor(java.lang.String aModelURI, java.lang.String shortName, Processor proc)` Add an operation processor.
`void` | `addQueryProcessor(java.lang.String aModelURI, java.lang.String langName, QueryProcessor queryProc)` Add a query operation processor.
`Request` | `createOperation(java.lang.String uri, java.lang.String url, java.lang.String opName)` Find target model, choose processor and make an operation.
`Request` | `createQueryRequest(java.lang.String uri, java.lang.String url, java.lang.String langName)`
`Request` | `createRequest(java.lang.String uri, java.lang.String url, java.lang.String opName, boolean modelMustExist)`
`com.hp.hpl.jena.rdf.model.Model` | `exec(Request request)` Actually do something!
`ModelSource` | `findModel(java.lang.String uri)`
`Loader` | `getLoader()`
`ModelSet` | `getModelSet()`
`com.hp.hpl.jena.rdf.model.Model` | `getOptionsModel(ModelSource aModel, java.lang.String baseName)`
`com.hp.hpl.jena.rdf.model.Model` | `getOptionsModel(java.lang.String baseName)`
`void` | `removeModelSource(java.lang.String uri)`
`void` | `removeProcessor(java.lang.String aModelURI, Processor processor)` Remove a processor.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Dispatcher

    public Dispatcher()

  Create a Dispatcher

### Dispatcher

    public Dispatcher(Dispatcher queryDispatcher)

  Create a Dispatcher that will call another if it can not handle the request

Parameters:
  `queryDispatcher` - Parent dispatcher

Method Detail

### getModelSet

    public ModelSet getModelSet()

### getLoader

    public Loader getLoader()

### createOperation

    public Request createOperation(java.lang.String uri,
                                   java.lang.String url,
                                   java.lang.String opName)
                            throws ExecutionException

  Find target model, choose processor and make an operation. The operation will need connection-specific completion for argument transport.

  Throws:
    `ExecutionException`

### createRequest

    public Request createRequest(java.lang.String uri,
                                 java.lang.String url,
                                 java.lang.String opName,
                                 boolean modelMustExist)
                          throws ExecutionException

  Throws:
    `ExecutionException`

### createQueryRequest

    public Request createQueryRequest(java.lang.String uri,
                                      java.lang.String url,
                                      java.lang.String langName)
                               throws ExecutionException

  Throws:
    `ExecutionException`

### exec

    public com.hp.hpl.jena.rdf.model.Model exec(Request request)
                                         throws ExecutionException

  Actually do something!

  Parameters:
    `request` - Request to perform
  Throws:
    `ExecutionException`

### findModel

    public ModelSource findModel(java.lang.String uri)

### getOptionsModel

    public com.hp.hpl.jena.rdf.model.Model getOptionsModel(java.lang.String baseName)
                                                    throws ExecutionException

  Throws:
    `ExecutionException`

### getOptionsModel

    public com.hp.hpl.jena.rdf.model.Model getOptionsModel(ModelSource aModel,
                                                           java.lang.String baseName)
                                                    throws ExecutionException

  Throws:
    `ExecutionException`

### addModelSource

    public void addModelSource(ModelSource aModel,
                               java.lang.String uri)

### removeModelSource

    public void removeModelSource(java.lang.String uri)

### addProcessor

    public void addProcessor(java.lang.String aModelURI,
                             java.lang.String shortName,
                             Processor proc)

  Add an operation processor.

  Parameters:
    `aModelURI` - URI for the source the processor is specific to.
    `shortName` - Short name for the operation
    `proc` - The processor

### addQueryProcessor

    public void addQueryProcessor(java.lang.String aModelURI,
                                  java.lang.String langName,
                                  QueryProcessor queryProc)

  Add a query operation processor.

  Parameters:
    `aModelURI` - Model the processor is specific to.
    `langName` - Language name
    `queryProc` - The query processor

### removeProcessor

    public void removeProcessor(java.lang.String aModelURI,
                                Processor processor)

  Remove a processor.

  Parameters:
    `aModelURI` - The attached model URI that the processor is specific to.
    `processor` - The processor

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 Hewlett-Packard. All Rights Reserved.