org.neo4j.kernel
Class KernelExtension<S>

java.lang.Object
  extended by org.neo4j.helpers.Service
      extended by org.neo4j.kernel.KernelExtension<S>
Type Parameters:
S - the Extension state type

public abstract class KernelExtension<S>
extends Service

Hook for providing extended functionality to the Neo4j Graph Database kernel. Implementations of KernelExtension must fulfill the following contract:

The simplest way to implement an extension that fulfills this contract is if the extension implementation is stateless, and all state is kept in the state object returned by the load method. Note that for an extension to be considered loaded by the kernel, the load method may not return null. The unload method will only be invoked if the kernel considers the extension loaded.

Author:
Tobias Ivarsson

Nested Class Summary
 
Nested classes/interfaces inherited from class org.neo4j.helpers.Service
Service.CaseInsensitiveService, Service.Implementation
 
Constructor Summary
KernelExtension(String key)
           
 
Method Summary
protected  Object agentArgument(String agentArg)
           
protected  S agentLoad(KernelData kernel, Object param)
           
protected  void agentVisit(KernelData kernel, S state, Object param)
           
 boolean equals(Object obj)
           
protected  S getState(KernelData kernel)
           
 int hashCode()
           
protected  boolean isLoaded(KernelData kernel)
           
protected abstract  S load(KernelData kernel)
          Load this extension for a particular Neo4j Kernel.
protected  void loadAgent(KernelData kernel, Object param)
           
 void loadAgent(String agentArgs)
           
protected  void loadConfiguration(KernelData kernel)
          Takes place before any data sources has been registered and is there to let extensions affect the configuration of other things starting up.
protected  void unload(S state)
           
 
Methods inherited from class org.neo4j.helpers.Service
load, load, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KernelExtension

public KernelExtension(String key)
Method Detail

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object

loadAgent

public final void loadAgent(String agentArgs)

loadAgent

protected final void loadAgent(KernelData kernel,
                               Object param)

agentArgument

protected Object agentArgument(String agentArg)

load

protected abstract S load(KernelData kernel)
Load this extension for a particular Neo4j Kernel.


agentLoad

protected S agentLoad(KernelData kernel,
                      Object param)

agentVisit

protected void agentVisit(KernelData kernel,
                          S state,
                          Object param)

loadConfiguration

protected void loadConfiguration(KernelData kernel)
Takes place before any data sources has been registered and is there to let extensions affect the configuration of other things starting up.


unload

protected void unload(S state)

getState

protected final S getState(KernelData kernel)

isLoaded

protected boolean isLoaded(KernelData kernel)


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.