01: package com.coldcore.coloradoftp.core;
02:
03: /**
04: * The core itself.
05: *
06: * Core is responsible for starting/stopping FTP server and all its parts.
07: * There is nothing else the core can do because starting from version 1.2
08: * all components run in separate threads and therefore execute on their own.
09: *
10: * Core has a special status names POISONED. This status means that the server is going to shut
11: * down and is waiting for all control and data connections to finish and disconnect. All connection
12: * pools and control connection acceptors must take core status into consideration.
13: *
14: * When poisoned and there are no connections left to serve, the server will not neccessarily stop.
15: * This is up to the implementation of the core.
16: *
17: *
18: * ColoradoFTP - The Open Source FTP Server (http://cftp.coldcore.com)
19: */
20: public interface Core {
21:
22: /** Start server */
23: public void start();
24:
25: /** Stop server */
26: public void stop();
27:
28: /** Poison server (no more connections allowed and existing will be killed when all data is transferred) */
29: public void poison();
30:
31: /** Get server status
32: * @return Server status
33: */
34: public CoreStatus getStatus();
35: }
|