Skip to content

Custom modules

Bryn Cooke edited this page Jul 21, 2013 · 4 revisions

You can extend the functionality of a FramedGraph via modules.

public interface Module {
	/**
	 * @param baseGraph The graph being framed.
	 * @param config The configuration for the new FramedGraph.
	 * @return The graph being framed.
	 */
	<T extends Graph> T configure(Graph baseGraph, FramedGraphConfiguration config);
}

configure will be called for every graph that is being framed. At this point you can add Method Handlers, Frame Initializers and Type Resolvers to the FramedGraphConfiguration.

You may wrap the graph being framed by returning the wrapped graph from this configure. For example, you could return an EventGraph if your module needs to know about graph events.

Notes

Clone this wiki locally