Class ShipConnectionImpl

    • Method Detail

      • initState

        public void initState()
        Description copied from interface: ShipConnection
        Start up the SHIP state machine. Callable only once.
        Specified by:
        initState in interface ShipConnection
      • onMessage

        public void onMessage​(byte[] message)
      • getState

        public State getState()
      • stopStateTimeouts

        public void stopStateTimeouts()
      • initiateConnectionClose

        public void initiateConnectionClose​(java.lang.Integer maxTime,
                                            ConnectionCloseReasonType reason)
      • setTrustLevel

        public void setTrustLevel​(int trustLevel)
        Set the trust level for this connection, overriding any trust level configured for the peer's SKI.
        Parameters:
        trustLevel - the trust level to set.
        See Also:
        disableForcedTrustLevel()
      • disableForcedTrustLevel

        public void disableForcedTrustLevel()
        Stop forcing a trust level, relying instead on the trust level recorded for the peer's SKI in the KeyManagement.
        See Also:
        setTrustLevel(int)
      • trustsCommPartner

        public boolean trustsCommPartner()
      • trustCommPartner

        public void trustCommPartner()
        Set the communication partner to be trusted, allowing communication to proceed.

        This is only allowed if the trust level for this connection is ≥8.

      • distrustCommPartner

        public void distrustCommPartner()
        Set the communication partner to untrusted. This does not affect the trust level configured for this connection or for the partner's SKI.
      • getSelectedMajor

        public int getSelectedMajor()
      • setSelectedMajor

        public void setSelectedMajor​(int selectedMajor)
      • getSelectedMinor

        public int getSelectedMinor()
      • setSelectedMinor

        public void setSelectedMinor​(int selectedMinor)
      • setSelectedVersion

        public void setSelectedVersion​(int major,
                                       int minor)
      • getSelectedFormat

        public java.lang.String getSelectedFormat()
      • setSelectedFormat

        public void setSelectedFormat​(java.lang.String selectedFormat)
      • isConnectionCloseState

        public boolean isConnectionCloseState()
      • getLogPrefix

        public java.lang.String getLogPrefix()
      • sendCdeMsg

        public void sendCdeMsg​(byte[] msg)
      • getRemoteSki

        public java.lang.String getRemoteSki()
        Specified by:
        getRemoteSki in interface ShipConnectionInterface
        Returns:
        the current SKI of the communication partner
      • prepareCDEShutdown

        public void prepareCDEShutdown()