|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--server.Survailance
Keeps an eye on the clients and kicks/bans them if they are too passive, or uses a known pattern of commands that should be banned!
Field Summary | |
static int |
ACTION_ON_FOUND_PATTERN
Default = BAN_ON_FOUND_PATTERN |
static int |
BAN_ON_FOUND_PATTERN
|
static int |
KICK_ON_FOUND_PATTERN
|
Method Summary | |
int |
addKickPattern(LogFileSession ses)
Adds a LogFileSession as a pattern, that clients will be kicked if they use! |
void |
addSurvailanceController(SurvailanceController survailanceController)
Adds a SurvailanceController. |
void |
clientConnected(UserSession userSession)
When a client connects this method is automatically called. |
void |
clientDisconnected(UserSession userSession)
When a client disconnects this method is automatically called. |
int |
containsPattern(LogFileSession logFileSession)
Sees if the LogFileSession already exists in the banpatterns. |
boolean |
deleteKickPattern(LogFileSession ses)
Delets a kickpattern from the survailance |
Vector |
getKickPatterns()
Gets all kickpatterns in a new Vector. |
LogFileReader |
getLogFileReader()
Gets the logFileReader reading the 'ban-patterns.conf' file. |
static Survailance |
instanceOf()
Constructor of Singleton class. |
boolean |
isStarted()
Is Survailance turned on |
void |
readloadPatterns()
Reloads all the patterns from the ban-patterns.conf file |
void |
removeSurvailanceController(SurvailanceController survailanceController)
Removes a SurvailanceController |
void |
serverStarted(boolean startedOk)
Indicated that the server has been attemped started |
void |
serverStoped()
The server has been stoped! |
void |
setSecondsToTimeout(int seconds)
Sets the number of seconds a client must live before he is kicked if he is too passive. |
void |
start()
Starts the survailance of clients. |
void |
stop()
Stops the survailance of clients. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int KICK_ON_FOUND_PATTERN
public static final int BAN_ON_FOUND_PATTERN
public static int ACTION_ON_FOUND_PATTERN
Method Detail |
public static Survailance instanceOf()
public int containsPattern(LogFileSession logFileSession)
logFileSession
- pattern to check if exists
public LogFileReader getLogFileReader()
public void setSecondsToTimeout(int seconds)
seconds
- Seconds before autokick if passivepublic final void clientConnected(UserSession userSession)
clientConnected
in interface ServerObserver
userSession
- the new clientpublic final void clientDisconnected(UserSession userSession)
clientDisconnected
in interface ServerObserver
userSession
- the disconnecting clientpublic void serverStarted(boolean startedOk)
ServerObserver
serverStarted
in interface ServerObserver
startedOk
- whether the server has started successfully or not.public void serverStoped()
ServerObserver
serverStoped
in interface ServerObserver
public int addKickPattern(LogFileSession ses)
ses
- pattern
public boolean deleteKickPattern(LogFileSession ses)
ses
- pattern
public void readloadPatterns()
public Vector getKickPatterns()
public void addSurvailanceController(SurvailanceController survailanceController)
survailanceController
- public void removeSurvailanceController(SurvailanceController survailanceController)
survailanceController
- public void start()
public void stop()
public boolean isStarted()
|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |