org.mobicents.media.server.impl.rtp
Class Receiver

java.lang.Object
  extended by org.mobicents.media.server.impl.rtp.Receiver
All Implemented Interfaces:
org.mobicents.media.server.spi.clock.Task

public class Receiver
extends java.lang.Object
implements org.mobicents.media.server.spi.clock.Task

Author:
kulikov

Field Summary
static int POLL_PERIOD
          Poll period measured in milliseconds
 
Constructor Summary
Receiver(RtpFactory factory)
          Creates new instance of Receiver.
 
Method Summary
 void cancel()
          Stops receiver.
 java.nio.channels.Selector getSelector()
          Gets datagram channel selector.
 boolean isActive()
          Shows the state of the receiver.
 int perform()
          Perform IO operations and operation which depends from IO.
 void start()
          Starts receiver.
 void stop()
          Stops receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLL_PERIOD

public static final int POLL_PERIOD
Poll period measured in milliseconds

See Also:
Constant Field Values
Constructor Detail

Receiver

public Receiver(RtpFactory factory)
         throws java.io.IOException
Creates new instance of Receiver.

Parameters:
factory - RTP manager running this receiver.
Throws:
java.io.IOException
Method Detail

getSelector

public java.nio.channels.Selector getSelector()
Gets datagram channel selector.

Returns:
selector instance.

start

public void start()
Starts receiver.


stop

public void stop()
Stops receiver.


cancel

public void cancel()
Stops receiver.

Specified by:
cancel in interface org.mobicents.media.server.spi.clock.Task

isActive

public boolean isActive()
Shows the state of the receiver.

Specified by:
isActive in interface org.mobicents.media.server.spi.clock.Task
Returns:
true if receiver is started and running and false if receiver is stopped.

perform

public int perform()
Perform IO operations and operation which depends from IO.

Specified by:
perform in interface org.mobicents.media.server.spi.clock.Task
Returns:
the intyerval in milliseconds for reschedule.


Copyright © 2010. All Rights Reserved.