public abstract class AbstractSrtpControl<T extends SrtpControl.TransformEngine> extends java.lang.Object implements SrtpControl
SrtpControl
to
facilitate implementers.SrtpControl.TransformEngine
Modifier and Type | Field and Description |
---|---|
protected T |
transformEngine |
RTP_SAVP, RTP_SAVPF
Modifier | Constructor and Description |
---|---|
protected |
AbstractSrtpControl(SrtpControlType srtpControlType)
Initializes a new AbstractSrtpControl instance with a specific
SrtpControlType.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup(java.lang.Object user)
Cleans up this SrtpControl and its TransformEngine.
|
protected abstract T |
createTransformEngine()
Initializes a new TransformEngine instance to be associated with
and used by this SrtpControl instance.
|
protected void |
doCleanup()
Prepares this
SrtpControl for garbage collection. |
SrtpControlType |
getSrtpControlType()
Gets the SrtpControlType of this instance.
|
SrtpListener |
getSrtpListener()
Returns the SrtpListener which listens for security events.
|
T |
getTransformEngine()
Returns the transform engine currently used by this stream.
|
void |
registerUser(java.lang.Object user)
Registers user as an instance which is currently using this
SrtpControl.
|
void |
setMasterSession(boolean masterSession)
When in multistream mode, enables the master session.
|
void |
setMultistream(SrtpControl master)
Sets the multistream data, which means that the master stream has
successfully started and this will start all other streams in this
session.
|
void |
setSrtpListener(SrtpListener srtpListener)
Sets a SrtpListener that will listen for security events.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSecureCommunicationStatus, requiresSecureSignalingTransport, setConnector, start
protected T extends SrtpControl.TransformEngine transformEngine
protected AbstractSrtpControl(SrtpControlType srtpControlType)
srtpControlType
- the SrtpControlType of the new instancepublic void cleanup(java.lang.Object user)
doCleanup()
if there are no more users (advertised via
registerUser(Object)
) of this SrtpControl
.cleanup
in interface SrtpControl
user
- the which requests the clean-up and is supposedly
currently using this SrtpControl
(i.e. has already used
SrtpControl.registerUser(Object)
).protected abstract T createTransformEngine()
protected void doCleanup()
SrtpControl
for garbage collection.public SrtpControlType getSrtpControlType()
getSrtpControlType
in interface SrtpControl
public SrtpListener getSrtpListener()
getSrtpListener
in interface SrtpControl
public T getTransformEngine()
getTransformEngine
in interface SrtpControl
public void setMasterSession(boolean masterSession)
setMasterSession
in interface SrtpControl
masterSession
- whether current control, controls the master session.public void setMultistream(SrtpControl master)
setMultistream
in interface SrtpControl
master
- The security control of the master stream.public void setSrtpListener(SrtpListener srtpListener)
setSrtpListener
in interface SrtpControl
srtpListener
- the SrtpListener that will receive the
eventspublic void registerUser(java.lang.Object user)
registerUser
in interface SrtpControl
user
- the Object
which is currently using this
SrtpControl
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.