net.jetrix.config
Class ServerConfig

java.lang.Object
  extended by net.jetrix.config.ServerConfig

public class ServerConfig
extends Object

Server configuration. This objet reads and retains server parameters, channel definitions and the ban list.

Version:
$Revision: 636 $, $Date: 2005-04-07 01:45:52 +0200 (jeu., 07 avr. 2005) $
Author:
Emmanuel Bourg

Field Summary
static String ENCODING
           
static int STATUS_LOCKED
           
static int STATUS_OPENED
           
static String VERSION
           
 
Constructor Summary
ServerConfig()
          Constructor declaration
 
Method Summary
 void addBannedHost(String host)
           
 void addChannel(ChannelConfig cconf)
           
 void addCommand(Command command)
           
 void addFilter(FilterConfig filterConfig)
           
 void addFilterAlias(String name, String classname)
           
 void addListener(Listener listener)
           
 void addService(Service service)
          Add a new service to the server.
 void addWinlist(WinlistConfig config)
           
 String getAccessLogPath()
           
 String getAdminPassword()
           
 List<ChannelConfig> getChannels()
           
 Settings getDefaultSettings()
           
 String getErrorLogPath()
           
 Iterator<FilterConfig> getGlobalFilters()
           
 InetAddress getHost()
           
 List<Listener> getListeners()
           
 Locale getLocale()
           
 int getMaxChannels()
           
 int getMaxConnections()
           
 int getMaxPlayers()
           
 String getMessageOfTheDay()
           
 String getName()
           
 String getOpPassword()
           
 List<Service> getServices()
          Return the list of services currently registered on the server
 Statistics getStatistics()
          Return the server statistics.
 int getStatus()
           
 int getTimeout()
           
 boolean isRunning()
           
 void load()
          Load the configuration.
 void save()
          Save the configuration.
 void setAccessLogPath(String accesslogPath)
           
 void setAdminPassword(String adminPassword)
           
 void setDefaultSettings(Settings defaultSettings)
           
 void setErrorLogPath(String errorlogPath)
           
 void setHost(InetAddress host)
           
 void setHost(String hostname)
           
 void setLocale(Locale locale)
           
 void setLocale(String language)
           
 void setMaxChannels(int maxChannels)
           
 void setMaxConnections(int maxConnections)
           
 void setMaxPlayers(int maxPlayers)
           
 void setMessageOfTheDay(String motd)
           
 void setName(String name)
           
 void setOpPassword(String oppass)
           
 void setRunning(boolean running)
           
 void setStatus(int status)
           
 void setTimeout(int timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING

public static final String ENCODING
See Also:
Constant Field Values

STATUS_OPENED

public static final int STATUS_OPENED
See Also:
Constant Field Values

STATUS_LOCKED

public static final int STATUS_LOCKED
See Also:
Constant Field Values

VERSION

public static final String VERSION
See Also:
Constant Field Values
Constructor Detail

ServerConfig

public ServerConfig()
Constructor declaration

Method Detail

load

public void load()
Load the configuration.


save

public void save()
          throws IOException
Save the configuration.

Throws:
IOException

getName

public String getName()

setName

public void setName(String name)

getHost

public InetAddress getHost()

setHost

public void setHost(InetAddress host)

setHost

public void setHost(String hostname)

getLocale

public Locale getLocale()

setLocale

public void setLocale(Locale locale)

setLocale

public void setLocale(String language)

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int timeout)

getMaxChannels

public int getMaxChannels()

setMaxChannels

public void setMaxChannels(int maxChannels)

getMaxPlayers

public int getMaxPlayers()

setMaxPlayers

public void setMaxPlayers(int maxPlayers)

getMaxConnections

public int getMaxConnections()

setMaxConnections

public void setMaxConnections(int maxConnections)

getOpPassword

public String getOpPassword()

setOpPassword

public void setOpPassword(String oppass)

getAdminPassword

public String getAdminPassword()

setAdminPassword

public void setAdminPassword(String adminPassword)

getAccessLogPath

public String getAccessLogPath()

setAccessLogPath

public void setAccessLogPath(String accesslogPath)

getErrorLogPath

public String getErrorLogPath()

setErrorLogPath

public void setErrorLogPath(String errorlogPath)

getMessageOfTheDay

public String getMessageOfTheDay()

setMessageOfTheDay

public void setMessageOfTheDay(String motd)

isRunning

public boolean isRunning()

setRunning

public void setRunning(boolean running)

getStatus

public int getStatus()

setStatus

public void setStatus(int status)

getDefaultSettings

public Settings getDefaultSettings()

setDefaultSettings

public void setDefaultSettings(Settings defaultSettings)

getChannels

public List<ChannelConfig> getChannels()

addChannel

public void addChannel(ChannelConfig cconf)

getGlobalFilters

public Iterator<FilterConfig> getGlobalFilters()

addFilter

public void addFilter(FilterConfig filterConfig)

addFilterAlias

public void addFilterAlias(String name,
                           String classname)

addWinlist

public void addWinlist(WinlistConfig config)

addCommand

public void addCommand(Command command)

addListener

public void addListener(Listener listener)

getListeners

public List<Listener> getListeners()

addService

public void addService(Service service)
Add a new service to the server. The service is not started automatically by calling this method.

Parameters:
service - the service to add
Since:
0.2

getServices

public List<Service> getServices()
Return the list of services currently registered on the server

Since:
0.2

addBannedHost

public void addBannedHost(String host)

getStatistics

public Statistics getStatistics()
Return the server statistics.



Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.