org.red5.server.api.stream.support

## Class SimplePlayItem

- java.lang.Object
- - org.red5.server.api.stream.support.SimplePlayItem

All Implemented Interfaces:
  IPlayItem

    public class SimplePlayItem
    extends Object
    implements IPlayItem

Simple playlist item implementation

### Field Summary

Fields
`protected long` `length` Length - amount to play
`protected IMessageInput` `msgInput` Message source
`protected String` `name` Playlist item name
`protected long` `start` Start mark

### Method Summary

Methods
`static SimplePlayItem` `build(String name)` Builder for SimplePlayItem
`static SimplePlayItem` `build(String name, long start, long length)` Builder for SimplePlayItem
`boolean` `equals(Object obj)`
`long` `getLength()` Returns play item length in milliseconds
`IMessageInput` `getMessageInput()` Returns IMessageInput object.
`IMessageInput` `getMsgInput()` Alias for getMessageInput
`String` `getName()` Returns item name
`long` `getStart()` Returns boolean value that specifies whether item can be played
`int` `hashCode()`
`void` `setMsgInput(IMessageInput msgInput)` Setter for message input

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### 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

### Method Detail

#### 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

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### build

    public static SimplePlayItem build(String name)

Builder for SimplePlayItem

Parameters:
  `name` -
Returns:
  play item instance

#### build

    public static SimplePlayItem build(String name,
                       long start,
                       long length)

Builder for SimplePlayItem

Parameters:
  `name` -
  `start` -
  `length` -
Returns:
  play item instance