Package gnu.java.zrtp
Class ZrtpStateClass
- java.lang.Object
-
- gnu.java.zrtp.ZrtpStateClass
-
public class ZrtpStateClass extends Object
This class is the ZRTP protocol state engine. This class is responsible to handle the ZRTP protocol. It does not handle the ZRTP HMAC, DH, and other data management. This is done in class ZRtp which is the parent of this class. The methods of this class implement the ZRTP state actions.- Author:
- Werner Dittmann <Werner.Dittmann@t-online.de>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classZrtpStateClass.Eventprotected static classZrtpStateClass.EventDataTypestatic classZrtpStateClass.SecureSubStatesstatic classZrtpStateClass.ZrtpStates
-
Constructor Summary
Constructors Modifier Constructor Description protectedZrtpStateClass(ZRtp p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddispatchEvent()protected voidevAckDetected()protected voidevAckSent()protected voidevCommitSent()protected voidevInitial()protected voidevSecureState()protected voidevWaitClearAck()protected voidevWaitCommit()protected voidevWaitConfAck()protected voidevWaitConfirm1()protected voidevWaitConfirm2()protected voidevWaitDHPart2()protected voidevWaitErrorAck()longgetTimeoutValue()protected booleanisInState(ZrtpStateClass.ZrtpStates state)Check current state of the ZRTP state engineprotected booleanisMultiStream()protected voidprocessEvent(ZrtpStateClass.Event ev)protected voidsendSASRelay(ZrtpPacketSASRelay relay)Send a SAS relay packet.protected voidsetMultiStream(boolean multiStream)protected voidstopZrtpStates()protected booleansubEvWaitRelayAck()
-
-
-
Constructor Detail
-
ZrtpStateClass
protected ZrtpStateClass(ZRtp p)
-
-
Method Detail
-
getTimeoutValue
public long getTimeoutValue()
-
processEvent
protected void processEvent(ZrtpStateClass.Event ev)
-
stopZrtpStates
protected void stopZrtpStates()
-
dispatchEvent
protected void dispatchEvent()
-
evInitial
protected void evInitial()
-
evAckDetected
protected void evAckDetected()
-
evAckSent
protected void evAckSent()
-
evWaitCommit
protected void evWaitCommit()
-
evCommitSent
protected void evCommitSent()
-
evWaitDHPart2
protected void evWaitDHPart2()
-
evWaitConfirm1
protected void evWaitConfirm1()
-
evWaitConfirm2
protected void evWaitConfirm2()
-
evWaitConfAck
protected void evWaitConfAck()
-
evWaitClearAck
protected void evWaitClearAck()
-
evSecureState
protected void evSecureState()
-
subEvWaitRelayAck
protected boolean subEvWaitRelayAck()
-
evWaitErrorAck
protected void evWaitErrorAck()
-
sendSASRelay
protected void sendSASRelay(ZrtpPacketSASRelay relay)
Send a SAS relay packet. Get the SAS relay packet and send it. It stores the packet in the sentPacket variable to enable resending. The method switches to secure sub-state WaitSasRelayAck.- Parameters:
relay- The relay packet to send
-
isMultiStream
protected boolean isMultiStream()
- Returns:
- the multiStream
-
setMultiStream
protected void setMultiStream(boolean multiStream)
- Parameters:
multiStream- the multiStream to set
-
isInState
protected boolean isInState(ZrtpStateClass.ZrtpStates state)
Check current state of the ZRTP state engine- Parameters:
state- The state to check.- Returns:
- Returns true id ZRTP engine is in the given state, false otherwise.
-
-