org.openrdf.sesame.server
Class SesameServer

java.lang.Object
  extended byorg.openrdf.sesame.server.SesameServer

public class SesameServer
extends Object

Static object that represents a locally running Sesame server.

Version:
$Revision: 1.20.4.3 $
Author:
Jeen Broekstra

Constructor Summary
SesameServer()
           
 
Method Summary
static void addListener(SystemConfigCenterListener listener)
          Adds a SystemConfigCenterListener
static void clear()
          Clears the LocalService
static void createLocalService()
          Creates a LocalService object with the supplied SystemConfig.
static File getBaseDir()
          Gets the base dir against which to resolve relative paths (null if not set).
static LocalService getLocalService()
          Retrieves a LocalService object that can be used to access local repositories automatically
static SystemConfig getSystemConfig()
          Gets the current system configuration of the system.
static String getVersion()
          Gets the version of this code base.
static void removeListener(SystemConfigCenterListener listener)
          Removes a SystemConfigCenterListener
static void setBaseDir(File baseDir)
          Sets the base dir against which to resolve relative paths.
static void setDefaultLogFile(String fileName)
          Sets the default log file for all threads that have not registered themselves with ThreadLog.
static void setSystemConfig(SystemConfig newConfig)
          Sets a new system configuration for the system.
static void setThreadLogFile(String fileName)
          Sets the log file for the thread calling this method.
static void setThreadLogFileForRepository(String repositoryID)
          Sets the log file for the thread calling this method.
static void unsetDefaultLogFile()
          Unsets the default log file.
static void unsetThreadLogFile()
          Unsets the log file for the thread calling this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SesameServer

public SesameServer()
Method Detail

createLocalService

public static void createLocalService()
Creates a LocalService object with the supplied SystemConfig. This LocalService can subsequently be shared across the JVM, to allow different services and protocol handlers to access the local repositories.


getLocalService

public static LocalService getLocalService()
Retrieves a LocalService object that can be used to access local repositories automatically


getSystemConfig

public static SystemConfig getSystemConfig()
Gets the current system configuration of the system.


setSystemConfig

public static void setSystemConfig(SystemConfig newConfig)
Sets a new system configuration for the system. Loads a new configuration and refreshes Sesame.

Parameters:
newConfig - the new SystemConfig

setBaseDir

public static void setBaseDir(File baseDir)
Sets the base dir against which to resolve relative paths.


getBaseDir

public static File getBaseDir()
Gets the base dir against which to resolve relative paths (null if not set).


setDefaultLogFile

public static void setDefaultLogFile(String fileName)
Sets the default log file for all threads that have not registered themselves with ThreadLog.


unsetDefaultLogFile

public static void unsetDefaultLogFile()
Unsets the default log file.


setThreadLogFile

public static void setThreadLogFile(String fileName)
Sets the log file for the thread calling this method. All logging calls to ThreadLog will be logged in this file.


setThreadLogFileForRepository

public static void setThreadLogFileForRepository(String repositoryID)
Sets the log file for the thread calling this method. All logging calls to ThreadLog will be logged in this file. The calling thread is supposed to do stuff with the indicated repositoryID.


unsetThreadLogFile

public static void unsetThreadLogFile()
Unsets the log file for the thread calling this method.


getVersion

public static String getVersion()
Gets the version of this code base.

Returns:
A version String, e.g. "1.0".

clear

public static void clear()
Clears the LocalService


addListener

public static void addListener(SystemConfigCenterListener listener)
Adds a SystemConfigCenterListener

Parameters:
listener - SystemConfigCenterListener

removeListener

public static void removeListener(SystemConfigCenterListener listener)
Removes a SystemConfigCenterListener

Parameters:
listener - SystemConfigCenterListener


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.