Class RMILocalSocketFactory.LocalServerSocket

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    RMILocalSocketFactory

    protected static class RMILocalSocketFactory.LocalServerSocket
    extends java.net.ServerSocket
    This is a localhost-bound implementation of ServerSocket
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int currentPort  
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalServerSocket​(int port)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(java.net.SocketAddress endpoint)
      Override the bind operation, to make sure we only bind to localhost
      void bind​(java.net.SocketAddress endpoint, int backlog)
      Override the bind operation, to make sure we only bind to localhost
      • Methods inherited from class java.net.ServerSocket

        accept, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getOption, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, supportedOptions, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • currentPort

        protected int currentPort
    • Constructor Detail

      • LocalServerSocket

        public LocalServerSocket​(int port)
                          throws java.io.IOException
        Constructor. We only use the one, so the rest are immaterial.
        Throws:
        java.io.IOException
    • Method Detail

      • bind

        public void bind​(java.net.SocketAddress endpoint)
                  throws java.io.IOException
        Override the bind operation, to make sure we only bind to localhost
        Overrides:
        bind in class java.net.ServerSocket
        Throws:
        java.io.IOException
      • bind

        public void bind​(java.net.SocketAddress endpoint,
                         int backlog)
                  throws java.io.IOException
        Override the bind operation, to make sure we only bind to localhost
        Overrides:
        bind in class java.net.ServerSocket
        Throws:
        java.io.IOException