org.ops4j.pax.radman.gateway
Interface HostGroupService

All Known Subinterfaces:
JMXHostGroupService
All Known Implementing Classes:
HostGroupServiceImpl

public interface HostGroupService

Since:
0.1.0
Author:
Edward Yakop

Method Summary
 Host getHost(java.lang.String aHostIP, boolean createWhenNotExists)
          Returns the host given its host IP.
 HostGroup getHostGroup(java.lang.String aHostGroupName, boolean createWhenNotExists)
          Returns the host group given its host group name.
 java.util.List<HostGroup> getHostGroups()
          Returns all the host groups assocated to this service.
 java.util.List<Host> getHosts()
          Returns all the host associated to this host group service.
 java.util.List<Host> getOrphanHosts()
          Returns all hosts that are associated to this host group service but does not have any HostGroups.
 boolean removeHost(java.lang.String anId)
          Remove host given the host id.
 boolean removeHostGroup(java.lang.String anID)
          Removes host group given the host group id.
 

Method Detail

getHostGroup

HostGroup getHostGroup(java.lang.String aHostGroupName,
                       boolean createWhenNotExists)
                       throws java.lang.IllegalArgumentException
Returns the host group given its host group name.

Parameters:
aHostGroupName - The host group name. This argument must not be null.
createWhenNotExists - Set to true to create host group when not found.
Returns:
The HostGroup given the specified aHostGroupName.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified aHostGroupName argument is null.
Since:
0.1.0

getHost

Host getHost(java.lang.String aHostIP,
             boolean createWhenNotExists)
             throws java.lang.IllegalArgumentException
Returns the host given its host IP. Returns a new Host if not found.

Parameters:
aHostIP - The host group name. This argument must not be null.
createWhenNotExists - A boolean indicator to create the specified host if it does not exists.
Returns:
The host group given the specified hostGroupName.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified hostGroupName argument is null.
Since:
0.1.0

getHostGroups

java.util.List<HostGroup> getHostGroups()
Returns all the host groups assocated to this service. Returns an empty list if there is no host group found.

Returns:
All host group associated to this service instance.
Since:
0.1.0

getHosts

java.util.List<Host> getHosts()
Returns all the host associated to this host group service. Returns an empty list if there is no host group found.

Returns:
All hosts associated to this host group service.
Since:
0.1.0

getOrphanHosts

java.util.List<Host> getOrphanHosts()
Returns all hosts that are associated to this host group service but does not have any HostGroups. Returns an empty list if there is no hosts found.

Returns:
All hosts that are not associated to any host group.
Since:
0.1.0

removeHostGroup

boolean removeHostGroup(java.lang.String anID)
                        throws java.lang.IllegalArgumentException
Removes host group given the host group id.

Parameters:
anID - The host group id. This argument must not be null.
Returns:
Returns true if the object is removed.
Throws:
java.lang.IllegalArgumentException - Thrown if the anID argument is null.
Since:
0.1.0

removeHost

boolean removeHost(java.lang.String anId)
                   throws java.lang.IllegalArgumentException
Remove host given the host id.

Parameters:
anId - The host id. This argument must not be null.
Returns:
Returns true if the host is removed.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified anId argument is null.
Since:
0.1.0


Copyright © 2008. All Rights Reserved.