List of usage examples for org.eclipse.jgit.transport PostReceiveHook NULL
PostReceiveHook NULL
To view the source code for org.eclipse.jgit.transport PostReceiveHook NULL.
Click Source Link
From source file:com.tasktop.c2c.server.scm.web.GitSmartHttpServlet.java
License:Open Source License
public void setPostRecieveHook(final PostReceiveHook hook) { ReceivePackFactory<HttpServletRequest> rpf = new DefaultReceivePackFactory() { public ReceivePack create(final HttpServletRequest req, final Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack result = super.create(req, db); if (!result.getPostReceiveHook().equals(PostReceiveHook.NULL)) { throw new IllegalStateException(); }//from www.j av a 2 s . c om result.setPostReceiveHook(hook); return result; } }; setReceivePackFactory(rpf); }