QuickServer
v1.4.7

org.quickserver.net
Interface ServerHook

All Known Implementing Classes:
GhostSocketReaper

public interface ServerHook

This interface is for any class that would like to become a server hook. These are event listeners to the QuickServer.

Following types of Server hooks are currently supported. pre-startup, post-startup, pre-shutdown, post-shutdown. These classes should have a default constructor.

Since:
1.3.3
Author:
Akshathkumar Shetty
See Also:
ServerHooks, InitServerHook

Field Summary
static int POST_SHUTDOWN
           
static int POST_STARTUP
           
static int PRE_SHUTDOWN
           
static int PRE_STARTUP
           
 
Method Summary
 boolean handleEvent(int event)
          Invoked pre/post server event.
 java.lang.String info()
          Information about the server hook.
 void initHook(QuickServer quickserver)
          Method called to perform any initialisation
 

Field Detail

PRE_STARTUP

public static final int PRE_STARTUP
See Also:
Constant Field Values

POST_STARTUP

public static final int POST_STARTUP
See Also:
Constant Field Values

PRE_SHUTDOWN

public static final int PRE_SHUTDOWN
See Also:
Constant Field Values

POST_SHUTDOWN

public static final int POST_SHUTDOWN
See Also:
Constant Field Values
Method Detail

info

public java.lang.String info()
Information about the server hook.


initHook

public void initHook(QuickServer quickserver)
Method called to perform any initialisation

Parameters:
quickserver - is the server to which hook belongs to.

handleEvent

public boolean handleEvent(int event)
Invoked pre/post server event. If the hook is doing some action for the even passed it should return true indicating the same.

See Also:
PRE_STARTUP, POST_STARTUP, PRE_SHUTDOWN, POST_SHUTDOWN

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org