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.
 org.mobicents.media.server.spi.MediaType getMediaType()
          Gets the media type of the channel generated by this factory.
 java.util.List getPipes()
          Gets the existing list of pipes.
 Channel newInstance(org.mobicents.media.server.spi.Endpoint endpoint, org.mobicents.media.server.spi.MediaType media)
          Returns new channel.
 void setComponents(java.util.List components)
          Sets the list of components which will be placed into the new channel.
 void setMediaType(org.mobicents.media.server.spi.MediaType mediaType)
          Assigns media type which will be used by this factory for generation channels
 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,
                           org.mobicents.media.server.spi.MediaType media)
                    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

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.


getMediaType

public org.mobicents.media.server.spi.MediaType getMediaType()
Gets the media type of the channel generated by this factory.

Returns:
the media type identifier

setMediaType

public void setMediaType(org.mobicents.media.server.spi.MediaType mediaType)
Assigns media type which will be used by this factory for generation channels

Parameters:
mediaType - media type identifier.

start

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

Throws:
java.lang.Exception

stop

public void stop()
Stop this factory.



Copyright © 2010. All Rights Reserved.