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.jupnp.model.types.UnsignedIntegerFourBytes, org.jupnp.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) |
appendCurrentState, getCurrentTransportActionsString, getDefaultInstanceID, getLastChange, getPropertyChangeSupportpublic 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(UnsignedIntegerFourBytes instanceId, String currentURI, String currentURIMetaData) throws AVTransportException
setAVTransportURI in class AbstractAVTransportServiceAVTransportExceptionpublic void setNextAVTransportURI(UnsignedIntegerFourBytes instanceId, String nextURI, String nextURIMetaData) throws AVTransportException
setNextAVTransportURI in class AbstractAVTransportServiceAVTransportExceptionpublic void setPlayMode(UnsignedIntegerFourBytes instanceId, String newPlayMode) throws AVTransportException
setPlayMode in class AbstractAVTransportServiceAVTransportExceptionpublic void setRecordQualityMode(UnsignedIntegerFourBytes instanceId, String newRecordQualityMode) throws AVTransportException
setRecordQualityMode in class AbstractAVTransportServiceAVTransportExceptionpublic MediaInfo getMediaInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException
getMediaInfo in class AbstractAVTransportServiceAVTransportExceptionpublic TransportInfo getTransportInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException
getTransportInfo in class AbstractAVTransportServiceAVTransportExceptionpublic PositionInfo getPositionInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException
getPositionInfo in class AbstractAVTransportServiceAVTransportExceptionpublic DeviceCapabilities getDeviceCapabilities(UnsignedIntegerFourBytes instanceId) throws AVTransportException
getDeviceCapabilities in class AbstractAVTransportServiceAVTransportExceptionpublic TransportSettings getTransportSettings(UnsignedIntegerFourBytes instanceId) throws AVTransportException
getTransportSettings in class AbstractAVTransportServiceAVTransportExceptionpublic void stop(UnsignedIntegerFourBytes instanceId) throws AVTransportException
stop in class AbstractAVTransportServiceAVTransportExceptionpublic void play(UnsignedIntegerFourBytes instanceId, String speed) throws AVTransportException
play in class AbstractAVTransportServiceAVTransportExceptionpublic void pause(UnsignedIntegerFourBytes instanceId) throws AVTransportException
pause in class AbstractAVTransportServiceAVTransportExceptionpublic void record(UnsignedIntegerFourBytes instanceId) throws AVTransportException
record in class AbstractAVTransportServiceAVTransportExceptionpublic void seek(UnsignedIntegerFourBytes instanceId, String unit, String target) throws AVTransportException
seek in class AbstractAVTransportServiceAVTransportExceptionpublic void next(UnsignedIntegerFourBytes instanceId) throws AVTransportException
next in class AbstractAVTransportServiceAVTransportExceptionpublic void previous(UnsignedIntegerFourBytes instanceId) throws AVTransportException
previous in class AbstractAVTransportServiceAVTransportExceptionprotected TransportAction[] getCurrentTransportActions(UnsignedIntegerFourBytes instanceId) throws Exception
getCurrentTransportActions in class AbstractAVTransportServiceExceptionpublic UnsignedIntegerFourBytes[] getCurrentInstanceIds()
protected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes instanceId) throws AVTransportException
AVTransportExceptionprotected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes instanceId, boolean createDefaultTransport) throws AVTransportException
AVTransportExceptionprotected AVTransportStateMachine createStateMachine(UnsignedIntegerFourBytes instanceId)
protected AVTransport createTransport(UnsignedIntegerFourBytes instanceId, LastChange lastChange)
Copyright © 2023 jUPnP.org. All rights reserved.