public class WZStatus extends Object
WZStatus is a thread-safe class for working with SDK component state and error properties.
Many of the SDK components include a getStatus() and the methods of the
WZStatusCallback interface are passed a WZStatus argument indicating
the current status of a live streaming broadcast.
| Constructor and Description |
|---|
WZStatus()
The default constructor
|
WZStatus(int state)
Construct a new instance using the specified property values
|
WZStatus(int state,
WZError error)
Construct a new instance using the specified property values
|
WZStatus(WZStatus other)
Construct a new instance using the property values from the specified instance
|
| Modifier and Type | Method and Description |
|---|---|
WZError |
clearLastError()
Clear the value of the last error property, leaving the state as is
|
WZError |
clearLastError(int newState)
Clear the value of the last error property and sets the state to the specified value
|
WZError |
getLastError()
Returns the last error reported
|
WZError |
getLastError(boolean clear)
Returns the last error reported and clears the last error property
|
int |
getState()
Returns the value of the state property
|
boolean |
isBuffering()
Returns true if the current state is
PREBUFFERING_STARTED |
boolean |
isComplete()
Returns true if the current state is
COMPLETE |
boolean |
isIdle()
Returns true if the current state is
IDLE |
boolean |
isPaused()
Returns true if the current state is
PAUSED |
boolean |
isReady()
Returns true if the current state is
READY |
boolean |
isRunning()
Returns true if the current state is
RUNNING |
boolean |
isShutdown()
Returns true if the current state is
SHUTDOWN |
boolean |
isStarting()
Returns true if the current state is
STARTING |
boolean |
isStopped()
Returns true if the current state is
STOPPED |
boolean |
isStopping()
Returns true if the current state is
STOPPING |
boolean |
isUnknown()
Returns true if the current state is
UNKNOWN |
void |
set(int state,
WZError error)
Update the property values of this instance with the specified values
|
void |
set(WZStatus other)
Update the property values of this instance with the property values from the specified instance
|
int |
setAndWaitForState(int state,
int desiredState)
Updates the value of the state property and waits for the state to
transition to another value.
|
void |
setError(WZError other)
Sets the last error property values using the property values from the specified instance
|
void |
setState(int state)
Set the value of the state property
|
String |
toString() |
int |
waitForState(int desiredState)
Wait until the value of the state property is equal to the specified value or
WZState.IDLE |
public WZStatus()
public WZStatus(int state,
WZError error)
state - The value for state propertyerror - An instance used to initialize the last error propertypublic WZStatus(int state)
state - The value for state propertypublic WZStatus(WZStatus other)
other - The instance to replicatepublic int getState()
public void setState(int state)
state - The value for state propertypublic WZError getLastError()
public WZError getLastError(boolean clear)
public void setError(WZError other)
other - The instance to replicatepublic WZError clearLastError()
public WZError clearLastError(int newState)
newState - The new state valuepublic void set(int state,
WZError error)
state - The value for state propertyerror - An instance used to initialize the last error propertypublic void set(WZStatus other)
other - The instance with the property values to replicatepublic int setAndWaitForState(int state,
int desiredState)
An example use of this method is to update the value of the state property which causes an asynchronous task to complete and update the value of the state property itself.
state - The value for state propertydesiredState - The state property value to wait forwaitForState(int)public int waitForState(int desiredState)
WZState.IDLE
An example use of this method is to wait on an asynchronous task to complete and update the value of the state property.
desiredState - The state property value to wait forwaitForState(int)public boolean isIdle()
IDLEtrue if the current state is WZState.IDLE false otherwisepublic boolean isStarting()
STARTINGtrue if the current state is WZState.STARTING false otherwisepublic boolean isReady()
READYtrue if the current state is WZState.READY false otherwisepublic boolean isRunning()
RUNNINGtrue if the current state is WZState.RUNNING false otherwisepublic boolean isPaused()
PAUSEDtrue if the current state is WZState.PAUSED false otherwisepublic boolean isStopping()
STOPPINGtrue if the current state is WZState.STOPPING false otherwisepublic boolean isStopped()
STOPPEDtrue if the current state is WZState.STOPPED false otherwisepublic boolean isComplete()
COMPLETEtrue if the current state is WZState.COMPLETE false otherwisepublic boolean isShutdown()
SHUTDOWNtrue if the current state is WZState.SHUTDOWN false otherwisepublic boolean isUnknown()
UNKNOWNtrue if the current state is WZState.UNKNOWN false otherwisepublic boolean isBuffering()
PREBUFFERING_STARTEDtrue if the current state is WZState.PREBUFFERING_STARTED false otherwise© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal