List of usage examples for org.eclipse.jgit.transport Daemon getService
public synchronized DaemonService getService(String name)
From source file:com.benhumphreys.jgitcassandra.Server.java
License:Apache License
public static void main(String[] args) { // Create the Cassandra Store Connection if (args.length < 1) { System.err.println("Must specify one or more Cassandra nodes"); return;// www.j av a 2 s . c o m } StoreConnection conn = new StoreConnection(Arrays.asList(args)); // Start the Git server Daemon server = new Daemon(new InetSocketAddress(9418)); boolean uploadsEnabled = true; server.getService("git-receive-pack").setEnabled(uploadsEnabled); //server.setRepositoryResolver(new InMemoryRepositoryResolver()); // For testing server.setRepositoryResolver(new CassandraRepositoryResolver(conn)); try { server.start(); } catch (IOException e) { System.out.println("Failed to start server: " + e.getMessage()); e.printStackTrace(); } }
From source file:com.sap.poc.jgit.storage.jdbc.pgm.JdbcDaemon.java
License:Eclipse Distribution License
private DaemonService service(final org.eclipse.jgit.transport.Daemon d, final String n) { final DaemonService svc = d.getService(n); if (svc == null) throw die(MessageFormat.format(CLIText.get().serviceNotSupported, n)); return svc;// w w w.j a v a 2 s.co m }