tigase.vhosts
Interface VHostManagerIfc

All Known Implementing Classes:
VHostManager

public interface VHostManagerIfc

This is VHostManagerIfc interface which allows to access data for virtual domains server by this installation. There can be normally only one instance of this interface implementation loaded on the server at any given time. The instance is responsible for managing all virtual hosts and assigning correct component to each of the virtual hosts or non-local domains. Created: 22 Nov 2008

Version:
$Rev: 1279 $
Author:
Artur Hefczyc

Method Summary
 ServerComponent[] getComponentsForLocalDomain(java.lang.String domain)
          The method returns an array with server components which can process packets for a given local domain.
 ServerComponent[] getComponentsForNonLocalDomain(java.lang.String domain)
          The method returns an array of server components which can process packets sent to non-local domain.
 boolean isAnonymousEnabled(java.lang.String domain)
          This method checks whether anonymous login is enabled for a given domain.
 boolean isLocalDomain(java.lang.String domain)
          This method checks whether given domain is server by this server instance.
 boolean isLocalDomainOrComponent(java.lang.String domain)
           
 

Method Detail

isLocalDomain

boolean isLocalDomain(java.lang.String domain)
This method checks whether given domain is server by this server instance. That is if this domain is local to this server installation. It doesn't check however whether the domain is disabled or enabled. It only checks if tthe list of local domains contains this virtual host.

Parameters:
domain - is a String with domain name to check.
Returns:
a boolean value indicating whether given domain is local or not.

isLocalDomainOrComponent

boolean isLocalDomainOrComponent(java.lang.String domain)

isAnonymousEnabled

boolean isAnonymousEnabled(java.lang.String domain)
This method checks whether anonymous login is enabled for a given domain. That is it checks whether this domains is local and anonymousEnabled parameter for this domain is set to true.

Parameters:
domain - is a String with domain name to check.
Returns:
a boolean value indicating whether given domain is enabled for anonymous logins or not.

getComponentsForLocalDomain

ServerComponent[] getComponentsForLocalDomain(java.lang.String domain)
The method returns an array with server components which can process packets for a given local domain. If the domain is not local null is returned. The given domain may also consist of: component name ServerComponent.getName() plus any local domain but only if the component returns true from method call: VHostListener.handlesNameSubdomains()

Parameters:
domain - is a String with a domain name to check. It may by just a local domain or string created with component name and localdomain.
Returns:
an array with ServerComponents which can handle packets for a given domain or null if no component found for a given domain.

getComponentsForNonLocalDomain

ServerComponent[] getComponentsForNonLocalDomain(java.lang.String domain)
The method returns an array of server components which can process packets sent to non-local domain. Most commonly there is only one such component: server-2-server connections manager. It is possible however there might be more such components. All of them will get the packet for processing.

Parameters:
domain - is a String with a domain to check. At the moment this parameter is ignored. In the future it will be possible to assign a specific component for any non-local domain.
Returns:
an array with ServerComponents which can handle packets to non-local domains.


Copyright © 2009 Tigase. All Rights Reserved.