Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia
Class ProcessorUtility

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.ProcessorUtility
All Implemented Interfaces:
javax.media.ControllerListener

public class ProcessorUtility
extends Object
implements javax.media.ControllerListener

A utility class that provides utility functions when working with processors.

Author:
Emil Ivov, Ken Larson, Lubomir Marinov

Constructor Summary
ProcessorUtility()
          Initializes a new ProcessorUtility instance.
 
Method Summary
 void controllerUpdate(javax.media.ControllerEvent ce)
          This method is called when an event is generated by a Controller that this listener is registered with.
 boolean waitForState(javax.media.Processor processor, int state)
          Waits until processor enters state and returns a boolean indicating success or failure of the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorUtility

public ProcessorUtility()
Initializes a new ProcessorUtility instance.

Method Detail

controllerUpdate

public void controllerUpdate(javax.media.ControllerEvent ce)
This method is called when an event is generated by a Controller that this listener is registered with. We use the event to notify all waiting on our lock and record success or failure.

Specified by:
controllerUpdate in interface javax.media.ControllerListener
Parameters:
ce - The event generated.

waitForState

public boolean waitForState(javax.media.Processor processor,
                            int state)
Waits until processor enters state and returns a boolean indicating success or failure of the operation.

Parameters:
processor - Processor
state - one of the Processor.XXXed state vars
Returns:
true if the state has been reached; false, otherwise

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.