Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.neoworks.jukex.tracksource
Class RoundRobinPipelineElement

    java.lang.Object
      |
      +--com.neoworks.jukex.tracksource.TrackSourcePipelineElementSkeleton
            |
            +--com.neoworks.jukex.tracksource.RoundRobinPipelineElement

All Implemented Interfaces:
  java.io.Serializable, TrackSource, TrackSourcePipelineElement

public class RoundRobinPipelineElement
extends TrackSourcePipelineElementSkeleton

This pipeline element takes several InMemoryPlaylist track sources and interleaves their requests.

Author:
  Nick Vincent nick@neoworks.com
See Also:
  Serialized Form

Field Summary

Fields inherited from class com.neoworks.jukex.tracksource.TrackSourcePipelineElementSkeleton
`name`

Constructor Summary
`RoundRobinPipelineElement()` Creates a new instance of RoundRobinPipelineElement

Method Summary
`void` | `addTrackSource(TrackSource ts)` Add a track source to the list of sources to play from
`java.lang.Object` | `clone()` Clone this TrackSourcePipelineElement
`java.lang.String` | `getDescription()` Return a String describing what, in general terms, this TrackSource does
`Track` | `getNextTrack()` Get the next track from the source.
`java.util.Map` | `getState()` Get the current state of this PipelineElement for persisting
`java.lang.String` | `getSummary()` Return a String summarising the configuration of the task the source is performing
`java.util.List` | `peekTracks(int count)` Peek at the next count tracks from this TrackSourcePipelineElement
`void` | `removeTrackSource(TrackSource ts)` Remove a TrackSource from the list of sources to play from
`boolean` | `setState(java.util.Map state)` Load the configuration of this PipelineElement

Methods inherited from class com.neoworks.jukex.tracksource.TrackSourcePipelineElementSkeleton
`delegateGetNextTrack, delegatePeekTracks, disable, enable, getName, getNextTrackSource, getOwner, isEnabled, removeTrack, setName, setNextTrackSource, setOwner, storeState`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RoundRobinPipelineElement

    public RoundRobinPipelineElement()

  Creates a new instance of RoundRobinPipelineElement

Method Detail

### getNextTrack

    public Track getNextTrack()

  Get the next track from the source.

  Returns:
    A Track object

### addTrackSource

    public void addTrackSource(TrackSource ts)

  Add a track source to the list of sources to play from

  Parameters:
    `ts` - The TrackSource to add

### removeTrackSource

    public void removeTrackSource(TrackSource ts)

  Remove a TrackSource from the list of sources to play from

  Parameters:
    `ts` - The TrackSource to remove

### getState

    public java.util.Map getState()

  Get the current state of this PipelineElement for persisting

  Specified by:
    `getState` in interface `TrackSourcePipelineElement`
  Specified by:
    `getState` in class `TrackSourcePipelineElementSkeleton`
  Returns:
    a String keyed Map of objects representing the state of this PipelineElement, e.g. for a Playlist this would be information allowing the reconstruction of the current playlist queue.

### peekTracks

    public java.util.List peekTracks(int count)

  Peek at the next count tracks from this TrackSourcePipelineElement

  Parameters:
    `count` - The number of Tracks to peek ahead at
  Returns:
    A List of Track objects

### setState

    public boolean setState(java.util.Map state)

  Load the configuration of this PipelineElement

  Specified by:
    `setState` in interface `TrackSourcePipelineElement`
  Specified by:
    `setState` in class `TrackSourcePipelineElementSkeleton`
  Parameters:
    `state` - a Map of values keyed by Strings representing the state of this PipelineElement.
  Returns:
    success

### clone

    public java.lang.Object clone()

  Clone this TrackSourcePipelineElement

  Specified by:
    `clone` in interface `TrackSource`
  Specified by:
    `clone` in class `TrackSourcePipelineElementSkeleton`
  Returns:
    A copy of this object

### getSummary

    public java.lang.String getSummary()

  Return a String summarising the configuration of the task the source is performing

  Returns:
    A String

### getDescription

    public java.lang.String getDescription()

  Return a String describing what, in general terms, this TrackSource does

  Returns:
    A String

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD