Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/nio/NetworkTrafficSelectChannelEndPoint.java @ 820:8e9db0bbf4f9
remove org.eclipse.jetty.util.log and upgrade slf4j
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 13 Sep 2016 23:13:06 -0600 |
| parents | 3428c60d7cfc |
| children |
comparison
equal
deleted
inserted
replaced
| 819:17bd0b170ed6 | 820:8e9db0bbf4f9 |
|---|---|
| 24 import java.nio.channels.SocketChannel; | 24 import java.nio.channels.SocketChannel; |
| 25 import java.util.List; | 25 import java.util.List; |
| 26 | 26 |
| 27 import org.eclipse.jetty.io.Buffer; | 27 import org.eclipse.jetty.io.Buffer; |
| 28 import org.eclipse.jetty.io.NetworkTrafficListener; | 28 import org.eclipse.jetty.io.NetworkTrafficListener; |
| 29 import org.eclipse.jetty.util.log.Log; | 29 import org.slf4j.Logger; |
| 30 import org.eclipse.jetty.util.log.Logger; | 30 import org.slf4j.LoggerFactory; |
| 31 | 31 |
| 32 public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint | 32 public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint |
| 33 { | 33 { |
| 34 private static final Logger LOG = Log.getLogger(NetworkTrafficSelectChannelEndPoint.class); | 34 private static final Logger LOG = LoggerFactory.getLogger(NetworkTrafficSelectChannelEndPoint.class); |
| 35 | 35 |
| 36 private final List<NetworkTrafficListener> listeners; | 36 private final List<NetworkTrafficListener> listeners; |
| 37 | 37 |
| 38 public NetworkTrafficSelectChannelEndPoint(SocketChannel channel, SelectorManager.SelectSet selectSet, SelectionKey key, int maxIdleTime, List<NetworkTrafficListener> listeners) throws IOException | 38 public NetworkTrafficSelectChannelEndPoint(SocketChannel channel, SelectorManager.SelectSet selectSet, SelectionKey key, int maxIdleTime, List<NetworkTrafficListener> listeners) throws IOException |
| 39 { | 39 { |
| 80 { | 80 { |
| 81 listener.opened(_socket); | 81 listener.opened(_socket); |
| 82 } | 82 } |
| 83 catch (Exception x) | 83 catch (Exception x) |
| 84 { | 84 { |
| 85 LOG.warn(x); | 85 LOG.warn("",x); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 99 Buffer view = buffer.asReadOnlyBuffer(); | 99 Buffer view = buffer.asReadOnlyBuffer(); |
| 100 listener.incoming(_socket, view); | 100 listener.incoming(_socket, view); |
| 101 } | 101 } |
| 102 catch (Exception x) | 102 catch (Exception x) |
| 103 { | 103 { |
| 104 LOG.warn(x); | 104 LOG.warn("",x); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 | 109 |
| 120 view.setPutIndex(position + written); | 120 view.setPutIndex(position + written); |
| 121 listener.outgoing(_socket, view); | 121 listener.outgoing(_socket, view); |
| 122 } | 122 } |
| 123 catch (Exception x) | 123 catch (Exception x) |
| 124 { | 124 { |
| 125 LOG.warn(x); | 125 LOG.warn("",x); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 138 { | 138 { |
| 139 listener.closed(_socket); | 139 listener.closed(_socket); |
| 140 } | 140 } |
| 141 catch (Exception x) | 141 catch (Exception x) |
| 142 { | 142 { |
| 143 LOG.warn(x); | 143 LOG.warn("",x); |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 } | 148 } |
