tigase.vhosts
Class VHostJDBCRepository

java.lang.Object
  extended by tigase.db.comp.ConfigRepository<Item>
      extended by tigase.db.comp.UserRepoRepository<VHostItem>
          extended by tigase.vhosts.VHostJDBCRepository
All Implemented Interfaces:
Iterable<VHostItem>, ComponentRepository<VHostItem>

public class VHostJDBCRepository
extends UserRepoRepository<VHostItem>

This implementation stores virtual domains in the UserRepository database. It loads initial settings and virtual hosts from the configuration file and then loads more vhosts from the database. Virtual domains from the database can overwrite (disable) vhosts loaded from the configuration file. This implementation keeps all virtual hosts and their parameters in a single database field. This might not be very efficient if you want to manager big number of virtual domains. It is sufficient for hundreds of vhosts. If you need thousands of VHosts support I advice to implement this storage in more efficient way using separate database tables instead of UserRepository. Please note there is a limit of about 300 vhosts if you use Derby database. Created: Nov 29, 2008 2:32:48 PM

Version:
$Rev: 1913 $
Author:
Artur Hefczyc

Field Summary
 
Fields inherited from class tigase.db.comp.UserRepoRepository
REPO_CLASS_PROP_KEY, REPO_URI_PROP_KEY
 
Fields inherited from class tigase.db.comp.ConfigRepository
items
 
Fields inherited from interface tigase.db.ComponentRepository
COMP_REPO_BIND
 
Constructor Summary
VHostJDBCRepository()
           
 
Method Summary
 String getConfigKey()
           
 String[] getDefaultPropetyItems()
           
 VHostItem getItemInstance()
          Creates a new, uninitialized instance of the repository Item.
 String getItemsListPKey()
           
 String getPropertyKey()
           
 String getRepoUser()
           
 
Methods inherited from class tigase.db.comp.UserRepoRepository
getDefaults, reload, setProperties, store
 
Methods inherited from class tigase.db.comp.ConfigRepository
addItem, allItems, contains, getItem, iterator, removeItem, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VHostJDBCRepository

public VHostJDBCRepository()
Method Detail

getRepoUser

public String getRepoUser()
Specified by:
getRepoUser in class UserRepoRepository<VHostItem>

getDefaultPropetyItems

public String[] getDefaultPropetyItems()
Specified by:
getDefaultPropetyItems in class ConfigRepository<VHostItem>

getPropertyKey

public String getPropertyKey()
Specified by:
getPropertyKey in class ConfigRepository<VHostItem>

getConfigKey

public String getConfigKey()
Specified by:
getConfigKey in class ConfigRepository<VHostItem>

getItemInstance

public VHostItem getItemInstance()
Description copied from interface: ComponentRepository
Creates a new, uninitialized instance of the repository Item.

Returns:
a new, uninitialized instance of the repository Item.

getItemsListPKey

public String getItemsListPKey()
Overrides:
getItemsListPKey in class UserRepoRepository<VHostItem>


Copyright © 2001-2006 Tigase Developers Team. All rights Reserved.