git:// transport protocol.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private Daemon. | |
| private static final int | |
| public static final int | DEFAULT_PORT
9418: IANA assigned port number for Git. |
| private InetSocketAddress | |
| private PackConfig | |
| private final ThreadGroup | |
| pack-priv volatile ReceivePackFactory | |
| private volatile RepositoryResolver | |
| private final DaemonService[] | |
| private int | |
| pack-priv volatile UploadPackFactory |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Daemon(InetSocketAddress
address to listen for connections on. If null, any available
port will be chosen on all network interfaces. addr)Configure a new daemon for the specified network address. |
| Modifier and Type | Method and Description |
|---|---|
| private synchronized void | |
| public synchronized InetSocketAddress | Returns: the address connections are received on.Get the address connections are received on. |
| public PackConfig | Returns: configuration controlling packing, may be null.Get configuration controlling packing, may be null. |
| public ReceivePackFactory | Returns: the factory.Get the factory used to construct per-request ReceivePack. |
| public synchronized DaemonService | Returns: the service; null if this daemon implementation doesn't support the requested service type.name of the service; e.g. "receive-pack"/"git-receive-pack" or
"upload-pack"/"git-upload-pack". name)Lookup a supported service so it can be reconfigured. |
| public int | Returns: timeout (in seconds) before aborting an IO operation.Get timeout (in seconds) before aborting an IO operation. |
| public synchronized boolean | Returns: true if this daemon is receiving connections.Whether this daemon is receiving connections. |
| pack-priv synchronized DaemonService | |
| pack-priv Repository | |
| public void | setPackConfig(PackConfig
configuration controlling packing parameters. If null the
source repository's settings will be used. pc)Set the configuration used by the pack generator. |
| public void | setReceivePackFactory(ReceivePackFactory<DaemonClient>
the factory. If null receive-pack is disabled. factory)Set the factory to construct and configure per-request ReceivePack. |
| public void | setRepositoryResolver(RepositoryResolver<DaemonClient>
the resolver instance. resolver)Set the resolver used to locate a repository by name. |
| public void | setTimeout(int
number of seconds to wait (with no data transfer occurring)
before aborting an IO read or write operation with the
connected client. seconds)Set the timeout before willing to abort an IO call. |
| public void | setUploadPackFactory(UploadPackFactory<DaemonClient>
the factory. If null upload-pack is disabled. factory)Set the factory to construct and configure per-request UploadPack. |
| public synchronized void | |
| pack-priv void | |
| public synchronized void | |
| public void |
| acceptThread | back to summary |
|---|---|
| private Daemon. | |
| BACKLOG | back to summary |
|---|---|
| private static final int BACKLOG | |
| DEFAULT_PORT | back to summary |
|---|---|
| public static final int DEFAULT_PORT 9418: IANA assigned port number for Git. | |
| myAddress | back to summary |
|---|---|
| private InetSocketAddress myAddress | |
| packConfig | back to summary |
|---|---|
| private PackConfig packConfig | |
| processors | back to summary |
|---|---|
| private final ThreadGroup processors | |
| receivePackFactory | back to summary |
|---|---|
| pack-priv volatile ReceivePackFactory<DaemonClient> receivePackFactory | |
| repositoryResolver | back to summary |
|---|---|
| private volatile RepositoryResolver<DaemonClient> repositoryResolver | |
| services | back to summary |
|---|---|
| private final DaemonService[] services | |
| timeout | back to summary |
|---|---|
| private int timeout | |
| uploadPackFactory | back to summary |
|---|---|
| pack-priv volatile UploadPackFactory<DaemonClient> uploadPackFactory | |
| Daemon | back to summary |
|---|---|
| public Daemon() Configure a daemon to listen on any available network port. | |
| Daemon | back to summary |
|---|---|
| public Daemon(InetSocketAddress addr) Configure a new daemon for the specified network address.
| |
| clearThread | back to summary |
|---|---|
| private synchronized void clearThread() | |
| getAddress | back to summary |
|---|---|
| public synchronized InetSocketAddress getAddress() Get the address connections are received on.
| |
| getPackConfig | back to summary |
|---|---|
| public PackConfig getPackConfig() Get configuration controlling packing, may be null.
| |
| getReceivePackFactory | back to summary |
|---|---|
| public ReceivePackFactory Get the factory used to construct per-request ReceivePack.
| |
| getService | back to summary |
|---|---|
| public synchronized DaemonService getService(String name) Lookup a supported service so it can be reconfigured.
| |
| getTimeout | back to summary |
|---|---|
| public int getTimeout() Get timeout (in seconds) before aborting an IO operation.
| |
| isRunning | back to summary |
|---|---|
| public synchronized boolean isRunning() Whether this daemon is receiving connections.
| |
| matchService | back to summary |
|---|---|
| pack-priv synchronized DaemonService matchService(String cmd) | |
| openRepository | back to summary |
|---|---|
| pack-priv Repository openRepository(DaemonClient client, String name) throws ServiceMayNotContinueException | |
| setPackConfig | back to summary |
|---|---|
| public void setPackConfig(PackConfig pc) Set the configuration used by the pack generator.
| |
| setReceivePackFactory | back to summary |
|---|---|
| public void setReceivePackFactory(ReceivePackFactory<DaemonClient> factory) Set the factory to construct and configure per-request ReceivePack.
| |
| setRepositoryResolver | back to summary |
|---|---|
| public void setRepositoryResolver(RepositoryResolver<DaemonClient> resolver) Set the resolver used to locate a repository by name.
| |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(int seconds) Set the timeout before willing to abort an IO call.
| |
| setUploadPackFactory | back to summary |
|---|---|
| public void setUploadPackFactory(UploadPackFactory<DaemonClient> factory) Set the factory to construct and configure per-request UploadPack.
| |
| start | back to summary |
|---|---|
| public synchronized void start() throws IOException Start this daemon on a background thread.
| |
| startClient | back to summary |
|---|---|
| pack-priv void startClient(Socket s) | |
| stop | back to summary |
|---|---|
| public synchronized void stop() Stop this daemon. | |
| stopAndWait | back to summary |
|---|---|
| public void stopAndWait() throws InterruptedException Stops this daemon and waits until it's acceptor thread has finished.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ServerSocket | |
| private final AtomicBoolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | run()
Overrides java. Implements java. This method is run by the thread when it executes. |
| public void | |
| private void |
| listenSocket | back to summary |
|---|---|
| private final ServerSocket listenSocket | |
| running | back to summary |
|---|---|
| private final AtomicBoolean running | |
| Acceptor | back to summary |
|---|---|
| public Acceptor(ThreadGroup group, String name, ServerSocket socket) | |
| isRunning | back to summary |
|---|---|
| public boolean isRunning() | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a
| |
| shutDown | back to summary |
|---|---|
| public void shutDown() | |
| terminate | back to summary |
|---|---|
| private void terminate() | |