Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class SdlSession

Hierarchy

java.lang.Object

Package
com.smartdevicelink.SdlConnection
All Implemented Interfaces
com.smartdevicelink.SdlConnection.ISdlConnectionListener, com.smartdevicelink.protocol.heartbeat.IHeartbeatMonitorListener, com.smartdevicelink.streaming.IStreamListener, com.smartdevicelink.security.ISecurityInitializedListener
All Known Subclasses
com.smartdevicelink.SdlConnection.SdlSession2

Quick Jump

Fields
Constructors
Methods

Fields

BUFF_READ_SIZE

protected static final int BUFF_READ_SIZE
Constant Value
1024

transportConfig

protected com.smartdevicelink.transport.BaseTransportConfig transportConfig

sessionListener

protected com.smartdevicelink.SdlConnection.ISdlConnectionListener sessionListener

lockScreenMan

protected com.smartdevicelink.proxy.LockScreenManager lockScreenMan

sdlSecurity

protected com.smartdevicelink.security.SdlSecurityBase sdlSecurity

desiredVideoParams

protected com.smartdevicelink.streaming.video.VideoStreamingParameters desiredVideoParams

acceptedVideoParams

protected com.smartdevicelink.streaming.video.VideoStreamingParameters acceptedVideoParams

sessionId

protected byte sessionId

sessionHashId

protected int sessionHashId

serviceListeners

protected java.util.HashMap serviceListeners

encryptedServices

protected java.util.concurrent.CopyOnWriteArrayList encryptedServices

Constructors

SdlSession()

public SdlSession()

Methods

createSession( byte wiproVersion, ISdlConnectionListener listener, BaseTransportConfig btConfig )

public static com.smartdevicelink.SdlConnection.SdlSession createSession(byte wiproVersion,ISdlConnectionListener listener,BaseTransportConfig btConfig)

Parameters

wiproVersion
listener
btConfig

getTransportConfig()

public com.smartdevicelink.transport.BaseTransportConfig getTransportConfig()

getLockScreenMan()

public com.smartdevicelink.proxy.LockScreenManager getLockScreenMan()

getOutgoingHeartbeatMonitor()

public com.smartdevicelink.protocol.heartbeat.IHeartbeatMonitor getOutgoingHeartbeatMonitor()

getIncomingHeartbeatMonitor()

public com.smartdevicelink.protocol.heartbeat.IHeartbeatMonitor getIncomingHeartbeatMonitor()

setOutgoingHeartbeatMonitor( IHeartbeatMonitor outgoingHeartbeatMonitor )

public void setOutgoingHeartbeatMonitor(IHeartbeatMonitor outgoingHeartbeatMonitor)

Parameters

outgoingHeartbeatMonitor

setIncomingHeartbeatMonitor( IHeartbeatMonitor incomingHeartbeatMonitor )

public void setIncomingHeartbeatMonitor(IHeartbeatMonitor incomingHeartbeatMonitor)

Parameters

incomingHeartbeatMonitor

getSessionHashId()

public int getSessionHashId()

getSessionId()

public byte getSessionId()

getSdlConnection()

public com.smartdevicelink.SdlConnection.SdlConnection getSdlConnection()

getMtu()

public int getMtu()

getMtu( SessionType type )

public long getMtu(SessionType type)

Parameters

type

close()

public void close()

startStream( InputStream is, SessionType sType, byte rpcSessionID )

public void startStream(InputStream is,SessionType sType,byte rpcSessionID) throws java.io.IOException

Parameters

is
sType
rpcSessionID

Throws

  • java.io.IOException

startStream( SessionType sType, byte rpcSessionID )

public java.io.OutputStream startStream(SessionType sType,byte rpcSessionID) throws java.io.IOException

Parameters

sType
rpcSessionID

Throws

  • java.io.IOException

startVideoStream()

public com.smartdevicelink.proxy.interfaces.IVideoStreamListener startVideoStream()

startAudioStream()

public com.smartdevicelink.proxy.interfaces.IAudioStreamListener startAudioStream()

startRPCStream( InputStream is, RPCRequest request, SessionType sType, byte rpcSessionID, byte wiproVersion )

public void startRPCStream(InputStream is,RPCRequest request,SessionType sType,byte rpcSessionID,byte wiproVersion)

Parameters

is
request
sType
rpcSessionID
wiproVersion

startRPCStream( RPCRequest request, SessionType sType, byte rpcSessionID, byte wiproVersion )

public java.io.OutputStream startRPCStream(RPCRequest request,SessionType sType,byte rpcSessionID,byte wiproVersion)

Parameters

request
sType
rpcSessionID
wiproVersion

pauseRPCStream()

public void pauseRPCStream()

resumeRPCStream()

public void resumeRPCStream()

stopRPCStream()

public void stopRPCStream()

stopAudioStream()

public boolean stopAudioStream()

stopVideoStream()

public boolean stopVideoStream()

pauseAudioStream()

public boolean pauseAudioStream()

pauseVideoStream()

public boolean pauseVideoStream()

resumeAudioStream()

public boolean resumeAudioStream()

resumeVideoStream()

public boolean resumeVideoStream()

createOpenGLInputSurface( int frameRate, int iFrameInterval, int width, int height, int bitrate, SessionType sType, byte rpcSessionID )

public android.view.Surface createOpenGLInputSurface(int frameRate,int iFrameInterval,int width,int height,int bitrate,SessionType sType,byte rpcSessionID)

Parameters

frameRate
iFrameInterval
width
height
bitrate
sType
rpcSessionID

startEncoder()

public void startEncoder()

releaseEncoder()

public void releaseEncoder()

drainEncoder( boolean endOfStream )

public void drainEncoder(boolean endOfStream)

Parameters

endOfStream

sendStreamPacket( ProtocolMessage pm )

public void sendStreamPacket(ProtocolMessage pm)

Parameters

pm

setSdlSecurity( SdlSecurityBase sec )

public void setSdlSecurity(SdlSecurityBase sec)

Parameters

sec

getSdlSecurity()

public com.smartdevicelink.security.SdlSecurityBase getSdlSecurity()

startService( SessionType serviceType, byte sessionID, boolean isEncrypted )

public void startService(SessionType serviceType,byte sessionID,boolean isEncrypted)

Parameters

serviceType
sessionID
isEncrypted

endService( SessionType serviceType, byte sessionID )

public void endService(SessionType serviceType,byte sessionID)

Parameters

serviceType
sessionID

processControlService( ProtocolMessage msg )

protected void processControlService(ProtocolMessage msg)

Parameters

msg

getBroadcastComment( BaseTransportConfig myTransport )

public java.lang.String getBroadcastComment(BaseTransportConfig myTransport)

Parameters

myTransport

startSession()

public void startSession() throws com.smartdevicelink.exception.SdlException

Throws

initialiseSession()

protected void initialiseSession()

sendMessage( ProtocolMessage msg )

public void sendMessage(ProtocolMessage msg)

Parameters

msg

getCurrentTransportType()

public com.smartdevicelink.transport.enums.TransportType getCurrentTransportType()

getIsConnected()

public boolean getIsConnected()

isServiceProtected( SessionType sType )

public boolean isServiceProtected(SessionType sType)

Parameters

sType

onTransportDisconnected( String info )

public void onTransportDisconnected(String info)

Parameters

info

onTransportDisconnected( String info, boolean availablePrimary, MultiplexTransportConfig transportConfig )

public void onTransportDisconnected(String info,boolean availablePrimary,MultiplexTransportConfig transportConfig)

Parameters

info
availablePrimary
transportConfig

onTransportError( String info, Exception e )

public void onTransportError(String info,Exception e)

Parameters

info
e

onProtocolMessageReceived( ProtocolMessage msg )

public void onProtocolMessageReceived(ProtocolMessage msg)

Parameters

msg

onHeartbeatTimedOut( byte sessionID )

public void onHeartbeatTimedOut(byte sessionID)

Parameters

sessionID

onProtocolSessionStarted( SessionType sessionType, byte sessionID, byte version, String correlationID, int hashID, boolean isEncrypted )

public void onProtocolSessionStarted(SessionType sessionType,byte sessionID,byte version,String correlationID,int hashID,boolean isEncrypted)

Parameters

sessionType
sessionID
version
correlationID
hashID
isEncrypted

onProtocolSessionEnded( SessionType sessionType, byte sessionID, String correlationID )

public void onProtocolSessionEnded(SessionType sessionType,byte sessionID,String correlationID)

Parameters

sessionType
sessionID
correlationID

onProtocolError( String info, Exception e )

public void onProtocolError(String info,Exception e)

Parameters

info
e

sendHeartbeat( IHeartbeatMonitor monitor )

public void sendHeartbeat(IHeartbeatMonitor monitor)

Parameters

monitor

heartbeatTimedOut( IHeartbeatMonitor monitor )

public void heartbeatTimedOut(IHeartbeatMonitor monitor)

Parameters

monitor

onProtocolSessionStartedNACKed( SessionType sessionType, byte sessionID, byte version, String correlationID, java.util.List<java.lang.String> rejectedParams )

public void onProtocolSessionStartedNACKed(SessionType sessionType,byte sessionID,byte version,String correlationID,java.util.List<java.lang.String> rejectedParams)

Parameters

sessionType
sessionID
version
correlationID
rejectedParams

onProtocolSessionEndedNACKed( SessionType sessionType, byte sessionID, String correlationID )

public void onProtocolSessionEndedNACKed(SessionType sessionType,byte sessionID,String correlationID)

Parameters

sessionType
sessionID
correlationID

onProtocolServiceDataACK( SessionType sessionType, int dataSize, byte sessionID )

public void onProtocolServiceDataACK(SessionType sessionType,int dataSize,byte sessionID)

Parameters

sessionType
dataSize
sessionID

onSecurityInitialized()

public void onSecurityInitialized()

clearConnection()

public void clearConnection()

checkForOpenMultiplexConnection( SdlConnection connection )

public void checkForOpenMultiplexConnection(SdlConnection connection)

Parameters

connection

removeConnection( SdlConnection connection )

public static boolean removeConnection(SdlConnection connection)

Parameters

connection

addServiceListener( SessionType serviceType, ISdlServiceListener sdlServiceListener )

public void addServiceListener(SessionType serviceType,ISdlServiceListener sdlServiceListener)

Parameters

serviceType
sdlServiceListener

removeServiceListener( SessionType serviceType, ISdlServiceListener sdlServiceListener )

public boolean removeServiceListener(SessionType serviceType,ISdlServiceListener sdlServiceListener)

Parameters

serviceType
sdlServiceListener

getServiceListeners()

public java.util.HashMap getServiceListeners()

setDesiredVideoParams( VideoStreamingParameters params )

public void setDesiredVideoParams(VideoStreamingParameters params)

Parameters

params

getDesiredVideoParams()

Returns the currently set desired video streaming parameters. If there haven't been any set, the default options will be returned and set for this instance.

public com.smartdevicelink.streaming.video.VideoStreamingParameters getDesiredVideoParams()

setAcceptedVideoParams( VideoStreamingParameters params )

public void setAcceptedVideoParams(VideoStreamingParameters params)

Parameters

params

getAcceptedVideoParams()

public com.smartdevicelink.streaming.video.VideoStreamingParameters getAcceptedVideoParams()

getProtocolVersion()

public com.smartdevicelink.util.Version getProtocolVersion()

isTransportForServiceAvailable( SessionType sessionType )

Check to see if a transport is available to start/use the supplied service.

public boolean isTransportForServiceAvailable(SessionType sessionType)

Parameters

sessionType
the session that should be checked for transport availability

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section