Class SimplePlayItem

java.lang.Object
org.red5.server.api.stream.support.SimplePlayItem
All Implemented Interfaces:
Comparable<SimplePlayItem>, IPlayItem

public class SimplePlayItem extends Object implements IPlayItem, Comparable<SimplePlayItem>
Simple playlist item implementation
  • Field Details

    • created

      private long created
    • name

      protected final String name
      Playlist item name
    • start

      protected final long start
      Start mark
    • length

      protected final long length
      Length - amount to play
    • msgInput

      protected IMessageInput msgInput
      Message source
  • Constructor Details

    • SimplePlayItem

      private SimplePlayItem(String name)
    • SimplePlayItem

      private SimplePlayItem(String name, long start, long length)
  • Method Details

    • getLength

      public long getLength()
      Returns play item length in milliseconds
      Specified by:
      getLength in interface IPlayItem
      Returns:
      Play item length in milliseconds
    • getMessageInput

      public IMessageInput getMessageInput()
      Returns IMessageInput object. IMessageInput is an endpoint for a consumer to connect.
      Specified by:
      getMessageInput in interface IPlayItem
      Returns:
      IMessageInput object
    • getName

      public String getName()
      Returns item name
      Specified by:
      getName in interface IPlayItem
      Returns:
      item name
    • getStart

      public long getStart()
      Returns boolean value that specifies whether item can be played
      Specified by:
      getStart in interface IPlayItem
      Returns:
      start time
    • getMsgInput

      public IMessageInput getMsgInput()
      Alias for getMessageInput
      Returns:
      Message input source
    • setMsgInput

      public void setMsgInput(IMessageInput msgInput)
      Setter for message input
      Parameters:
      msgInput - Message input
    • getCreated

      public long getCreated()
      Returns:
      the created
    • setCreated

      public void setCreated(long created)
      Parameters:
      created - the created to set
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(SimplePlayItem that)
      Specified by:
      compareTo in interface Comparable<SimplePlayItem>
    • build

      public static SimplePlayItem build(String name)
      Builder for SimplePlayItem
      Parameters:
      name - name
      Returns:
      play item instance
    • build

      public static SimplePlayItem build(String name, long start, long length)
      Builder for SimplePlayItem
      Parameters:
      name - name
      start - start
      length - length
      Returns:
      play item instance
    • toString

      public String toString()
      Overrides:
      toString in class Object