public class JavaHandlerModule extends Object implements Module
Adds support for calling Java methods to handle a frames call. A call to a
frames method annotated with JavaHandler will cause the supplied
factory to instantiate an instance of the handler class and call the
appropriate method on it.
The default implementation is an inner class of the frame interface named 'Impl'. For example:
interface Person {
@JavaHandler
public String doSomething();
abstract class Impl implements Person, JavaHandlerContext {
public String doSomething() {
return "Use Frames!";
}
}
}
The implementation class can be overridden by using the JavaHandlerClass annotation.
| Constructor and Description |
|---|
JavaHandlerModule() |
| Modifier and Type | Method and Description |
|---|---|
com.tinkerpop.blueprints.Graph |
configure(com.tinkerpop.blueprints.Graph baseGraph,
FramedGraphConfiguration config) |
JavaHandlerModule |
withFactory(JavaHandlerFactory factory)
Provide an alternative factory for creating objects that handle frames
calls.
|
public JavaHandlerModule withFactory(JavaHandlerFactory factory)
factory - The factory to use.public com.tinkerpop.blueprints.Graph configure(com.tinkerpop.blueprints.Graph baseGraph,
FramedGraphConfiguration config)
Copyright © 2011-2014 JBoss by Red Hat. All Rights Reserved.