org.eclipse.ecf.server.generic
Class GenericServerContainerGroupFactory

java.lang.Object
  extended by org.eclipse.ecf.server.generic.GenericServerContainerGroupFactory
All Implemented Interfaces:
IGenericServerContainerGroupFactory

public class GenericServerContainerGroupFactory
extends java.lang.Object
implements IGenericServerContainerGroupFactory

Since:
6.0

Nested Class Summary
protected  class GenericServerContainerGroupFactory.SCGData
           
 
Field Summary
 
Fields inherited from interface org.eclipse.ecf.server.generic.IGenericServerContainerGroupFactory
DEFAULT_PORT, DEFAULT_SECURE_PORT, SSLTRANSPORT_CONTAINER_PROP
 
Constructor Summary
GenericServerContainerGroupFactory()
           
 
Method Summary
 void close()
           
 IGenericServerContainerGroup createContainerGroup(java.lang.String hostname)
          Create a new container group given a hostname using the IGenericServerContainerGroupFactory.DEFAULT_PORT.
 IGenericServerContainerGroup createContainerGroup(java.lang.String hostname, int port)
          Create a new container group given a hostname, and port.
 IGenericServerContainerGroup createContainerGroup(java.lang.String hostname, int port, java.util.Map defaultContainerProperties)
          Create a new container group given a hostname, port, and a Map of default container properties.
protected  IGenericServerContainerGroup createGenericServerContainerGroup(GenericServerContainerGroupFactory.SCGData scgdata, java.util.Map defaultContainerProperties)
           
 IGenericServerContainerGroup getContainerGroup(java.lang.String hostname, int port)
          Get the container group associated with the given hostname and port.
 IGenericServerContainerGroup[] getContainerGroups()
          Get all the container groups created by this container group factory.
protected  boolean isSSLTransportSpecified(java.util.Map defaultContainerProperties)
           
 IGenericServerContainerGroup removeContainerGroup(java.lang.String hostname, int port)
          Remove the container group with the given hostname and port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericServerContainerGroupFactory

public GenericServerContainerGroupFactory()
Method Detail

createContainerGroup

public IGenericServerContainerGroup createContainerGroup(java.lang.String hostname,
                                                         int port,
                                                         java.util.Map defaultContainerProperties)
                                                  throws GenericServerContainerGroupCreateException
Description copied from interface: IGenericServerContainerGroupFactory
Create a new container group given a hostname, port, and a Map of default container properties.

Specified by:
createContainerGroup in interface IGenericServerContainerGroupFactory
Parameters:
hostname - the hostname associated with the new container group. Must not be null.
port - the port that the new container group will listen on (once IGenericServerContainerGroup.startListening() is called). Should be a valid tcp port, openable for listening by this process via IGenericServerContainerGroup.startListening().
defaultContainerProperties - a Map of default properties passed to any IContainer instances created within the resulting group.
Returns:
new generic server container group. Will not return null.
Throws:
GenericServerContainerGroupCreateException - if a container group exists for the given hostname and port combination.
See Also:
IGenericServerContainerGroup

isSSLTransportSpecified

protected boolean isSSLTransportSpecified(java.util.Map defaultContainerProperties)

createGenericServerContainerGroup

protected IGenericServerContainerGroup createGenericServerContainerGroup(GenericServerContainerGroupFactory.SCGData scgdata,
                                                                         java.util.Map defaultContainerProperties)
                                                                  throws GenericServerContainerGroupCreateException
Throws:
GenericServerContainerGroupCreateException

createContainerGroup

public IGenericServerContainerGroup createContainerGroup(java.lang.String hostname,
                                                         int port)
                                                  throws GenericServerContainerGroupCreateException
Description copied from interface: IGenericServerContainerGroupFactory
Create a new container group given a hostname, and port.

Specified by:
createContainerGroup in interface IGenericServerContainerGroupFactory
Parameters:
hostname - the hostname associated with the new container group. Must not be null.
port - the port that the new container group will listen on (once IGenericServerContainerGroup.startListening() is called). Should be a valid tcp port, openable for listening by this process via IGenericServerContainerGroup.startListening().
Returns:
new generic server container group. Will not return null.
Throws:
GenericServerContainerGroupCreateException - if a container group exists for the given hostname and port combination.
See Also:
IGenericServerContainerGroup

createContainerGroup

public IGenericServerContainerGroup createContainerGroup(java.lang.String hostname)
                                                  throws GenericServerContainerGroupCreateException
Description copied from interface: IGenericServerContainerGroupFactory
Create a new container group given a hostname using the IGenericServerContainerGroupFactory.DEFAULT_PORT.

Specified by:
createContainerGroup in interface IGenericServerContainerGroupFactory
Parameters:
hostname - the hostname associated with the new container group. Must not be null.
Returns:
new generic server container group. Will not return null.
Throws:
GenericServerContainerGroupCreateException - if a container group exists for the given hostname and port combination.
See Also:
IGenericServerContainerGroup

close

public void close()

getContainerGroup

public IGenericServerContainerGroup getContainerGroup(java.lang.String hostname,
                                                      int port)
Description copied from interface: IGenericServerContainerGroupFactory
Get the container group associated with the given hostname and port.

Specified by:
getContainerGroup in interface IGenericServerContainerGroupFactory
Parameters:
hostname - the hostname associated with the new container group. Must not be null.
port - the port of the desired container group.
Returns:
the existing generic server container group associated with the given hostname and port. If no container group exists with the given hostname and port, null will be returned.

getContainerGroups

public IGenericServerContainerGroup[] getContainerGroups()
Description copied from interface: IGenericServerContainerGroupFactory
Get all the container groups created by this container group factory.

Specified by:
getContainerGroups in interface IGenericServerContainerGroupFactory
Returns:
array of generic server container groups. Will not return null, but may return empty array if no generic server container groups have been created by this factory.

removeContainerGroup

public IGenericServerContainerGroup removeContainerGroup(java.lang.String hostname,
                                                         int port)
Description copied from interface: IGenericServerContainerGroupFactory
Remove the container group with the given hostname and port.

Specified by:
removeContainerGroup in interface IGenericServerContainerGroupFactory
Parameters:
hostname - the hostname of the container group to remove. Must not be null.
port - the port of the desired container group.
Returns:
generic server container group removed. If no container group exists for this factory, then nothing was actually removed, and null will be returned.
See Also:
IGenericServerContainerGroupFactory.getContainerGroup(String, int)