Class LiveReloadServer

java.lang.Object
org.springframework.boot.devtools.livereload.LiveReloadServer

@Deprecated(since="4.1.0", forRemoval=true) public class LiveReloadServer extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.1.0 for removal in 4.3.0 with no replacement.
A livereload server.
Since:
1.3.0
Author:
Phillip Webb
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    The default live reload server port.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new LiveReloadServer listening on the default port.
    LiveReloadServer(int port)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new LiveReloadServer listening on the specified port.
    LiveReloadServer(int port, ThreadFactory threadFactory)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new LiveReloadServer listening on the specified port with a specific ThreadFactory.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new LiveReloadServer listening on the default port with a specific ThreadFactory.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.boot.devtools.livereload.Connection
    createConnection(Socket socket, InputStream inputStream, OutputStream outputStream)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Factory method used to create the Connection.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the port that the server is listening on.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return if the server has been started.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Start the livereload server and accept incoming connections.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gracefully stop the livereload server.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Trigger livereload of all connected clients.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      Deprecated, for removal: This API element is subject to removal in a future version.
      The default live reload server port.
      See Also:
  • Constructor Details

    • LiveReloadServer

      public LiveReloadServer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new LiveReloadServer listening on the default port.
    • LiveReloadServer

      public LiveReloadServer(ThreadFactory threadFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new LiveReloadServer listening on the default port with a specific ThreadFactory.
      Parameters:
      threadFactory - the thread factory
    • LiveReloadServer

      public LiveReloadServer(int port)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new LiveReloadServer listening on the specified port.
      Parameters:
      port - the listen port
    • LiveReloadServer

      public LiveReloadServer(int port, ThreadFactory threadFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new LiveReloadServer listening on the specified port with a specific ThreadFactory.
      Parameters:
      port - the listen port
      threadFactory - the thread factory
  • Method Details

    • start

      public int start() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Start the livereload server and accept incoming connections.
      Returns:
      the port on which the server is listening
      Throws:
      IOException - in case of I/O errors
    • isStarted

      public boolean isStarted()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if the server has been started.
      Returns:
      true if the server is running
    • getPort

      public int getPort()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the port that the server is listening on.
      Returns:
      the server port
    • stop

      public void stop() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gracefully stop the livereload server.
      Throws:
      IOException - in case of I/O errors
    • triggerReload

      public void triggerReload()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Trigger livereload of all connected clients.
    • createConnection

      protected org.springframework.boot.devtools.livereload.Connection createConnection(Socket socket, InputStream inputStream, OutputStream outputStream) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Factory method used to create the Connection.
      Parameters:
      socket - the source socket
      inputStream - the socket input stream
      outputStream - the socket output stream
      Returns:
      a connection
      Throws:
      IOException - in case of I/O errors