|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--server.Server
JQ-Data FTP-Server must be started though this class. When started all clients can connect to the server
on the running port (typically 21). All standard setups are in the setup.xml, that are generated the first
time the server runs.
If you want to change the port to fx. 3000, you can do it by doing:
getConfiguration().getRoot().setQuickOptionValue("Server.port","3000");
The one that makes an instance of this class will often be ServerObserver,
because it thereby gets all newcommers on the server send to it though ServerObservers interface!
The Object UserSession represents a client's session.
Field Summary | |
static String |
version
The Servers version. |
Method Summary | |
void |
addServerObserver(ServerObserver serverObserver)
Adds an observer. |
boolean |
deleteLogFileSessions(LogFileSession[] ses)
Deletes a group of LogFileSession from the logfiles. |
boolean |
doesAutoSave()
Checks whether autoSave is on or off. |
Conf |
getConfiguration()
Returns the configuration class. |
LogFileReader[] |
getLogFiles()
Gets all logfiles on the FTP-Server. |
UserSession[] |
getOnlineUsers()
Returns an array containing all online clients. |
int |
getServerPort()
The port the server will run on. |
static Server |
instanceOf()
Creates a singleton server, with a version name of ''. |
static Server |
instanceOf(String version)
Creates a singleton server |
boolean |
isRunning()
Wether the server is running or not. |
void |
removeServerObserver(ServerObserver serverObserver)
Removes an observer |
void |
setAutoSave(boolean on)
Sets the server to auto-save. |
void |
start()
Tries to start the FTP-Server as a thread. |
boolean |
stop()
Stops the FTP-Server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static String version
Method Detail |
public static Server instanceOf(String version)
version
- a name that is used in GUI, help and in commandline (java -jar JQData-FTP.jar -version). Only the first one to call this method gets the version name through,
public static Server instanceOf()
public void start()
public boolean stop()
public void addServerObserver(ServerObserver serverObserver)
serverObserver
- observerpublic void removeServerObserver(ServerObserver serverObserver)
serverObserver
- observerpublic Conf getConfiguration()
public boolean isRunning()
public int getServerPort()
public void setAutoSave(boolean on)
must be saved before the server are closed...sessioner 1
on
- public boolean doesAutoSave()
public UserSession[] getOnlineUsers()
public LogFileReader[] getLogFiles()
public boolean deleteLogFileSessions(LogFileSession[] ses)
ses
- an array consisting of LogFileSession objects to be deleted
|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |