|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.transport.Daemon
public class Daemon
Basic daemon for the anonymous git:// transport protocol.
| Field Summary | |
|---|---|
static int |
DEFAULT_PORT
9418: IANA assigned port number for Git. |
| Constructor Summary | |
|---|---|
Daemon()
Configure a daemon to listen on any available network port. |
|
Daemon(java.net.InetSocketAddress addr)
Configure a new daemon for the specified network address. |
|
| Method Summary | |
|---|---|
void |
exportDirectory(java.io.File dir)
Recursively export all Git repositories within a directory. |
void |
exportRepository(java.lang.String name,
Repository db)
Add a single repository to the set that is exported by this daemon. |
java.net.InetSocketAddress |
getAddress()
|
DaemonService |
getService(java.lang.String name)
Lookup a supported service so it can be reconfigured. |
int |
getTimeout()
|
boolean |
isExportAll()
|
boolean |
isRunning()
|
void |
setExportAll(boolean export)
Set whether or not to export all repositories. |
void |
setTimeout(int seconds)
Set the timeout before willing to abort an IO call. |
void |
start()
Start this daemon on a background thread. |
void |
stop()
Stop this daemon. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_PORT
| Constructor Detail |
|---|
public Daemon()
public Daemon(java.net.InetSocketAddress addr)
addr - address to listen for connections on. If null, any available
port will be chosen on all network interfaces.| Method Detail |
|---|
public java.net.InetSocketAddress getAddress()
public DaemonService getService(java.lang.String name)
name - name of the service; e.g. "receive-pack"/"git-receive-pack" or
"upload-pack"/"git-upload-pack".
public boolean isExportAll()
git-daemon-export-ok is required to export
a repository; true if git-daemon-export-ok is
ignored.setExportAll(boolean)public void setExportAll(boolean export)
If false (the default), repositories must have a
git-daemon-export-ok file to be accessed through this
daemon.
If true, all repositories are available through the daemon, whether or
not git-daemon-export-ok exists.
export -
public void exportRepository(java.lang.String name,
Repository db)
The existence (or lack-thereof) of git-daemon-export-ok is
ignored by this method. The repository is always published.
name - name the repository will be published under.db - the repository instance.public void exportDirectory(java.io.File dir)
dir - the directory to export. This directory must not itself be a
git repository, but any directory below it which has a file
named git-daemon-export-ok will be published.public int getTimeout()
public void setTimeout(int seconds)
seconds - number of seconds to wait (with no data transfer occurring)
before aborting an IO read or write operation with the
connected client.
public void start()
throws java.io.IOException
java.io.IOException - the server socket could not be opened.
java.lang.IllegalStateException - the daemon is already running.public boolean isRunning()
public void stop()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||