Package ch.qos.logback.core.net

Examples of ch.qos.logback.core.net.SocketConnector


    @Override
    public void run() {
        try {
            while (!Thread.currentThread().isInterrupted()) {
                SocketConnector connector = new DefaultSocketConnector(address, port, 0, reconnectionDelay);
                connector.setExceptionHandler(this);
                connector.setSocketFactory(SocketFactory.getDefault());

                try {
                    connectorTask = getContext().getExecutorService().submit(connector);
                } catch (RejectedExecutionException e) {
                    connectorTask = null;
View Full Code Here


   */
  public void run() {
    try {
      LoggerContext lc = (LoggerContext) getContext();
      while (!Thread.currentThread().isInterrupted()) {
        SocketConnector connector = createConnector(address, port, 0,
                reconnectionDelay);
        connectorTask = activateConnector(connector);
        if (connectorTask == null)
          break;
        socket = waitForConnectorToReturnASocket();
View Full Code Here

    addInfo("shutting down");
  }

  private SocketConnector createConnector(InetAddress address, int port,
                                          int initialDelay, int retryDelay) {
    SocketConnector connector = newConnector(address, port, initialDelay,
            retryDelay);
    connector.setExceptionHandler(this);
    connector.setSocketFactory(getSocketFactory());
    return connector;
  }
View Full Code Here

   * {@inheritDoc}
   */
  public void run() {
    try {
      LoggerContext lc = (LoggerContext) getContext();
      SocketConnector connector = createConnector(address, port, 0,
              reconnectionDelay);
      while (!Thread.currentThread().isInterrupted()) {
        try {
          getContext().getExecutorService().execute(connector);
        } catch (RejectedExecutionException ex) {
          // executor is shutting down...
          continue;
        }
        socket = connector.awaitConnection();
        dispatchEvents(lc);
        connector = createConnector(address, port, reconnectionDelay);
      }
    } catch (InterruptedException ex) {
      assert true;    // ok... we'll exit now
View Full Code Here

    return createConnector(address, port, delay, delay);
  }

  private SocketConnector createConnector(InetAddress address, int port,
                                          int initialDelay, int retryDelay) {
    SocketConnector connector = newConnector(address, port, initialDelay,
            retryDelay);
    connector.setExceptionHandler(this);
    connector.setSocketFactory(getSocketFactory());
    return connector;
  }
View Full Code Here

     * {@inheritDoc}
     */
    public final void run() {
        try {
            while (!Thread.currentThread().isInterrupted()) {
                SocketConnector connector = createConnector(address, port, 0,
                        reconnectionDelay.getMilliseconds());
               
                connectorTask = activateConnector(connector);
                if (connectorTask == null)
                    break;
View Full Code Here

        addInfo("shutting down");
    }
   
    private SocketConnector createConnector(InetAddress address, int port,
            int initialDelay, long retryDelay) {
        SocketConnector connector = newConnector(address, port, initialDelay,
                retryDelay);
        connector.setExceptionHandler(this);
        connector.setSocketFactory(getSocketFactory());
        return connector;
    }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.net.SocketConnector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.