org.teleal.cling.support.avtransport.impl
Class AVTransportService<T extends AVTransport>
java.lang.Object
org.teleal.cling.support.avtransport.AbstractAVTransportService
org.teleal.cling.support.avtransport.impl.AVTransportService<T>
public class AVTransportService<T extends AVTransport>
- extends AbstractAVTransportService
State-machine based implementation of AVTransport service.
One logical AVTransport is represented by:
-
One
AVTransportStateMachine
instance that accepts the action method call as a proxy.
-
Each state machine holds several instances of
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.
-
Each state has a reference to an implementation of
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.teleal.cling.model.types.UnsignedIntegerFourBytes, org.teleal.cling.support.lastchange.LastChange)
method to utilize a subclass of AVTransport
as your internal state holder.
- Author:
- Christian Bauer
Method Summary |
protected AVTransportStateMachine |
createStateMachine(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
protected AVTransport |
createTransport(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
LastChange lastChange)
|
protected AVTransportStateMachine |
findStateMachine(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
protected AVTransportStateMachine |
findStateMachine(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
boolean createDefaultTransport)
|
String |
getCurrentTransportActions(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
DeviceCapabilities |
getDeviceCapabilities(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
MediaInfo |
getMediaInfo(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
PositionInfo |
getPositionInfo(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
TransportInfo |
getTransportInfo(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
TransportSettings |
getTransportSettings(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
void |
next(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
void |
pause(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
void |
play(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String speed)
|
void |
previous(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
void |
record(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
void |
seek(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String unit,
String target)
|
void |
setAVTransportURI(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String currentURI,
String currentURIMetaData)
|
void |
setNextAVTransportURI(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String nextURI,
String nextURIMetaData)
|
void |
setPlayMode(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String newPlayMode)
|
void |
setRecordQualityMode(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String newRecordQualityMode)
|
void |
stop(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AVTransportService
public AVTransportService(Class<? extends AVTransportStateMachine> stateMachineDefinition,
Class<? extends AbstractState> initialState)
AVTransportService
public AVTransportService(Class<? extends AVTransportStateMachine> stateMachineDefinition,
Class<? extends AbstractState> initialState,
Class<T> transportClass)
setAVTransportURI
public void setAVTransportURI(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String currentURI,
String currentURIMetaData)
throws AVTransportException
- Specified by:
setAVTransportURI
in class AbstractAVTransportService
- Throws:
AVTransportException
setNextAVTransportURI
public void setNextAVTransportURI(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String nextURI,
String nextURIMetaData)
throws AVTransportException
- Specified by:
setNextAVTransportURI
in class AbstractAVTransportService
- Throws:
AVTransportException
setPlayMode
public void setPlayMode(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String newPlayMode)
throws AVTransportException
- Specified by:
setPlayMode
in class AbstractAVTransportService
- Throws:
AVTransportException
setRecordQualityMode
public void setRecordQualityMode(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String newRecordQualityMode)
throws AVTransportException
- Specified by:
setRecordQualityMode
in class AbstractAVTransportService
- Throws:
AVTransportException
getMediaInfo
public MediaInfo getMediaInfo(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
getMediaInfo
in class AbstractAVTransportService
- Throws:
AVTransportException
getTransportInfo
public TransportInfo getTransportInfo(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
getTransportInfo
in class AbstractAVTransportService
- Throws:
AVTransportException
getPositionInfo
public PositionInfo getPositionInfo(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
getPositionInfo
in class AbstractAVTransportService
- Throws:
AVTransportException
getDeviceCapabilities
public DeviceCapabilities getDeviceCapabilities(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
getDeviceCapabilities
in class AbstractAVTransportService
- Throws:
AVTransportException
getTransportSettings
public TransportSettings getTransportSettings(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
getTransportSettings
in class AbstractAVTransportService
- Throws:
AVTransportException
getCurrentTransportActions
public String getCurrentTransportActions(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
getCurrentTransportActions
in class AbstractAVTransportService
- Throws:
AVTransportException
stop
public void stop(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
stop
in class AbstractAVTransportService
- Throws:
AVTransportException
play
public void play(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String speed)
throws AVTransportException
- Specified by:
play
in class AbstractAVTransportService
- Throws:
AVTransportException
pause
public void pause(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
pause
in class AbstractAVTransportService
- Throws:
AVTransportException
record
public void record(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
record
in class AbstractAVTransportService
- Throws:
AVTransportException
seek
public void seek(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
String unit,
String target)
throws AVTransportException
- Specified by:
seek
in class AbstractAVTransportService
- Throws:
AVTransportException
next
public void next(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
next
in class AbstractAVTransportService
- Throws:
AVTransportException
previous
public void previous(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Specified by:
previous
in class AbstractAVTransportService
- Throws:
AVTransportException
findStateMachine
protected AVTransportStateMachine findStateMachine(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
throws AVTransportException
- Throws:
AVTransportException
findStateMachine
protected AVTransportStateMachine findStateMachine(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
boolean createDefaultTransport)
throws AVTransportException
- Throws:
AVTransportException
createStateMachine
protected AVTransportStateMachine createStateMachine(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId)
createTransport
protected AVTransport createTransport(org.teleal.cling.model.types.UnsignedIntegerFourBytes instanceId,
LastChange lastChange)
Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.