Class ServersCommunicationLayer

  • All Implemented Interfaces:
    java.lang.Runnable

    public class ServersCommunicationLayer
    extends java.lang.Thread
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ServersCommunicationLayer.PendingConnection  
      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.crypto.SecretKey getSecretKey​(int id)  
      void joinViewReceived()  
      void run()  
      void send​(int[] targets, SystemMessage sm, boolean useMAC)  
      static void setSocketOptions​(java.net.Socket socket)  
      static void setSSLSocketOptions​(javax.net.ssl.SSLSocket socket)  
      void shutdown()  
      java.lang.String toString()  
      void updateConnections()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServersCommunicationLayer

        public ServersCommunicationLayer​(ServerViewController controller,
                                         java.util.concurrent.LinkedBlockingQueue<SystemMessage> inQueue,
                                         ServiceReplica replica)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getSecretKey

        public javax.crypto.SecretKey getSecretKey​(int id)
      • updateConnections

        public void updateConnections()
      • send

        public final void send​(int[] targets,
                               SystemMessage sm,
                               boolean useMAC)
      • shutdown

        public void shutdown()
      • joinViewReceived

        public void joinViewReceived()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • setSSLSocketOptions

        public static void setSSLSocketOptions​(javax.net.ssl.SSLSocket socket)
      • setSocketOptions

        public static void setSocketOptions​(java.net.Socket socket)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Thread