public class AVTransportService<T extends AVTransport> extends AbstractAVTransportService
One logical AVTransport is represented by:
AVTransportStateMachine
instance that accepts the action method call as a proxy.
AbstractState
, created on
instantation of the state machine. The "current" state will be the target of
the action call. It is the state implementation that decides how to handle the
call and what the next state is after a possible transition.
AVTransport
, where the state can hold
information about well, the state.
Simplified, this means that each AVTransport instance ID is typically handled by
one state machine, and the internal state of that machine is stored in an
AVTransport
.
Override the createTransport(org.fourthline.cling.model.types.UnsignedIntegerFourBytes, org.fourthline.cling.support.lastchange.LastChange)
method to utilize a subclass of AVTransport
as your internal state holder.
propertyChangeSupport
Constructor and Description |
---|
AVTransportService(Class<? extends AVTransportStateMachine> stateMachineDefinition,
Class<? extends AbstractState> initialState) |
AVTransportService(Class<? extends AVTransportStateMachine> stateMachineDefinition,
Class<? extends AbstractState> initialState,
Class<T> transportClass) |
Modifier and Type | Method and Description |
---|---|
protected AVTransportStateMachine |
createStateMachine(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
protected AVTransport |
createTransport(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
LastChange lastChange) |
protected AVTransportStateMachine |
findStateMachine(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
protected AVTransportStateMachine |
findStateMachine(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
boolean createDefaultTransport) |
org.fourthline.cling.model.types.UnsignedIntegerFourBytes[] |
getCurrentInstanceIds() |
protected TransportAction[] |
getCurrentTransportActions(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
DeviceCapabilities |
getDeviceCapabilities(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
MediaInfo |
getMediaInfo(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
PositionInfo |
getPositionInfo(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
TransportInfo |
getTransportInfo(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
TransportSettings |
getTransportSettings(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
void |
next(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
void |
pause(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
void |
play(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
String speed) |
void |
previous(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
void |
record(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
void |
seek(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
String unit,
String target) |
void |
setAVTransportURI(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
String currentURI,
String currentURIMetaData) |
void |
setNextAVTransportURI(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
String nextURI,
String nextURIMetaData) |
void |
setPlayMode(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
String newPlayMode) |
void |
setRecordQualityMode(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId,
String newRecordQualityMode) |
void |
stop(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) |
appendCurrentState, getCurrentTransportActionsString, getDefaultInstanceID, getLastChange, getPropertyChangeSupport
public AVTransportService(Class<? extends AVTransportStateMachine> stateMachineDefinition, Class<? extends AbstractState> initialState)
public AVTransportService(Class<? extends AVTransportStateMachine> stateMachineDefinition, Class<? extends AbstractState> initialState, Class<T> transportClass)
public void setAVTransportURI(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, String currentURI, String currentURIMetaData) throws AVTransportException
setAVTransportURI
in class AbstractAVTransportService
AVTransportException
public void setNextAVTransportURI(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, String nextURI, String nextURIMetaData) throws AVTransportException
setNextAVTransportURI
in class AbstractAVTransportService
AVTransportException
public void setPlayMode(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, String newPlayMode) throws AVTransportException
setPlayMode
in class AbstractAVTransportService
AVTransportException
public void setRecordQualityMode(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, String newRecordQualityMode) throws AVTransportException
setRecordQualityMode
in class AbstractAVTransportService
AVTransportException
public MediaInfo getMediaInfo(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
getMediaInfo
in class AbstractAVTransportService
AVTransportException
public TransportInfo getTransportInfo(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
getTransportInfo
in class AbstractAVTransportService
AVTransportException
public PositionInfo getPositionInfo(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
getPositionInfo
in class AbstractAVTransportService
AVTransportException
public DeviceCapabilities getDeviceCapabilities(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
getDeviceCapabilities
in class AbstractAVTransportService
AVTransportException
public TransportSettings getTransportSettings(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
getTransportSettings
in class AbstractAVTransportService
AVTransportException
public void stop(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
stop
in class AbstractAVTransportService
AVTransportException
public void play(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, String speed) throws AVTransportException
play
in class AbstractAVTransportService
AVTransportException
public void pause(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
pause
in class AbstractAVTransportService
AVTransportException
public void record(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
record
in class AbstractAVTransportService
AVTransportException
public void seek(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, String unit, String target) throws AVTransportException
seek
in class AbstractAVTransportService
AVTransportException
public void next(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
next
in class AbstractAVTransportService
AVTransportException
public void previous(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
previous
in class AbstractAVTransportService
AVTransportException
protected TransportAction[] getCurrentTransportActions(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws Exception
getCurrentTransportActions
in class AbstractAVTransportService
Exception
public org.fourthline.cling.model.types.UnsignedIntegerFourBytes[] getCurrentInstanceIds()
protected AVTransportStateMachine findStateMachine(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId) throws AVTransportException
AVTransportException
protected AVTransportStateMachine findStateMachine(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, boolean createDefaultTransport) throws AVTransportException
AVTransportException
protected AVTransportStateMachine createStateMachine(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId)
protected AVTransport createTransport(org.fourthline.cling.model.types.UnsignedIntegerFourBytes instanceId, LastChange lastChange)
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.