org.mobicents.media.server.resource
Class ChannelFactory

java.lang.Object
  extended by org.mobicents.media.server.resource.ChannelFactory

public class ChannelFactory
extends java.lang.Object

Factory class for creating channels.

Author:
kulikov

Constructor Summary
ChannelFactory()
           
 
Method Summary
 java.util.List getComponents()
          Gets the list of components which will be placed into the new channel.
 int getCoreSize()
          Get amount of prestarted channels.
 int getMaxSize()
          Get maximum size of prestarted channels.
 java.util.List getPipes()
          Gets the existing list of pipes.
 Channel newInstance(org.mobicents.media.server.spi.Endpoint endpoint)
          Returns new channel.
 void release(Channel channel)
          Informs factory that specified channel not longer used.
 void setComponents(java.util.List components)
          Sets the list of components which will be placed into the new channel.
 void setCoreSize(int coreSize)
          Define amount of initialy prestarted channels.
 void setMaxSize(int maxSize)
          Define max pools size;
 void setPipes(java.util.List<PipeFactory> pipes)
          Modify pipe list.
 void start()
          Starts this factory.
 void stop()
          Stop this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelFactory

public ChannelFactory()
Method Detail

newInstance

public Channel newInstance(org.mobicents.media.server.spi.Endpoint endpoint)
                    throws org.mobicents.media.server.spi.ResourceUnavailableException
Returns new channel. if there is unused channels in the cache the existing channels will be returned and new instance other wise.

Returns:
Throws:
UnknownComponentException
org.mobicents.media.server.spi.ResourceUnavailableException

getCoreSize

public int getCoreSize()
Get amount of prestarted channels.

Returns:
the amount of prestarted channels.

getMaxSize

public int getMaxSize()
Get maximum size of prestarted channels.

Returns:
pool's max size.

setCoreSize

public void setCoreSize(int coreSize)
Define amount of initialy prestarted channels.

Parameters:
coreSize - the number of prestarted channels.

setMaxSize

public void setMaxSize(int maxSize)
Define max pools size;

Parameters:
maxSize - the maximum size of pool.

setPipes

public void setPipes(java.util.List<PipeFactory> pipes)
Modify pipe list.

Parameters:
pipes - the list of pipes beans defining media flow path

getPipes

public java.util.List getPipes()
Gets the existing list of pipes.

Returns:
the list of pipes.

getComponents

public java.util.List getComponents()
Gets the list of components which will be placed into the new channel.

Returns:
the list of media component.

setComponents

public void setComponents(java.util.List components)
Sets the list of components which will be placed into the new channel.


release

public void release(Channel channel)
Informs factory that specified channel not longer used.

Parameters:
channel - the reference to unused channel.

start

public void start()
           throws java.lang.Exception
Starts this factory.

Throws:
java.lang.Exception

stop

public void stop()
Stop this factory.



Copyright © 2009. All Rights Reserved.