Skip to content

Commit

Permalink
pull request cleanup netty#6
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei-Pozolotin committed Jan 4, 2013
1 parent 15c775c commit d651a48
Show file tree
Hide file tree
Showing 36 changed files with 84 additions and 285 deletions.
Expand Up @@ -23,8 +23,6 @@
import io.netty.example.udt.util.ThreadFactoryUDT;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import io.netty.logging.InternalLoggerFactory;
import io.netty.logging.Slf4JLoggerFactory;
import io.netty.transport.udt.UdtChannel;
import io.netty.transport.udt.nio.NioUdtProvider;

Expand All @@ -48,16 +46,6 @@ public class ByteEchoClient {
private static final Logger log = LoggerFactory
.getLogger(ByteEchoClient.class);

/**
* use slf4j provider for io.netty.logging.InternalLogger
*/
static {
final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
InternalLoggerFactory.setDefaultFactory(defaultFactory);
log.info("InternalLoggerFactory={}", InternalLoggerFactory
.getDefaultFactory().getClass().getName());
}

private final String host;
private final int port;
private final int messageSize;
Expand Down
Expand Up @@ -23,8 +23,6 @@
import io.netty.example.udt.util.ThreadFactoryUDT;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import io.netty.logging.InternalLoggerFactory;
import io.netty.logging.Slf4JLoggerFactory;
import io.netty.transport.udt.UdtChannel;
import io.netty.transport.udt.nio.NioUdtProvider;

Expand All @@ -43,16 +41,6 @@ public class ByteEchoServer {
private static final Logger log = LoggerFactory
.getLogger(ByteEchoServer.class);

/**
* use slf4j provider for io.netty.logging.InternalLogger
*/
static {
final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
InternalLoggerFactory.setDefaultFactory(defaultFactory);
log.info("InternalLoggerFactory={}", InternalLoggerFactory
.getDefaultFactory().getClass().getName());
}

private final int port;

public ByteEchoServer(final int port) {
Expand Down
Expand Up @@ -15,7 +15,7 @@
*/

/**
* examples form netty project adapted for udt
* Examples show how to use UDT Byte Streams.
*/
package io.netty.example.udt.echo.bytes;

Expand Up @@ -23,8 +23,6 @@
import io.netty.example.udt.util.ThreadFactoryUDT;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import io.netty.logging.InternalLoggerFactory;
import io.netty.logging.Slf4JLoggerFactory;
import io.netty.transport.udt.UdtChannel;
import io.netty.transport.udt.nio.NioUdtProvider;

Expand All @@ -48,16 +46,6 @@ public class MsgEchoClient {
private static final Logger log = LoggerFactory
.getLogger(MsgEchoClient.class);

/**
* use slf4j provider for io.netty.logging.InternalLogger
*/
static {
final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
InternalLoggerFactory.setDefaultFactory(defaultFactory);
log.info("InternalLoggerFactory={}", InternalLoggerFactory
.getDefaultFactory().getClass().getName());
}

private final String host;
private final int port;
private final int messageSize;
Expand Down
Expand Up @@ -23,8 +23,6 @@
import io.netty.example.udt.util.ThreadFactoryUDT;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import io.netty.logging.InternalLoggerFactory;
import io.netty.logging.Slf4JLoggerFactory;
import io.netty.transport.udt.UdtChannel;
import io.netty.transport.udt.nio.NioUdtProvider;

Expand All @@ -43,16 +41,6 @@ public class MsgEchoServer {
private static final Logger log = LoggerFactory
.getLogger(MsgEchoServer.class);

/**
* use slf4j provider for io.netty.logging.InternalLogger
*/
static {
final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
InternalLoggerFactory.setDefaultFactory(defaultFactory);
log.info("InternalLoggerFactory={}", InternalLoggerFactory
.getDefaultFactory().getClass().getName());
}

private final int port;

public MsgEchoServer(final int port) {
Expand Down
Expand Up @@ -15,7 +15,7 @@
*/

/**
* examples form netty project adapted for udt
* Examples show how to use UDT Message Flows.
*/
package io.netty.example.udt.echo.message;

Expand Up @@ -15,7 +15,7 @@
*/

/**
* examples form netty project adapted for udt
* Examples show how to use UDT with simple Echo Handlers.
*/
package io.netty.example.udt.echo;

Expand Up @@ -18,12 +18,15 @@
/**
* Peer to Peer Config
*/
public interface Config {
public final class Config {

String hostOne = "localhost";
int portOne = 1231;
private Config() {
}

String hostTwo = "localhost";
int portTwo = 1232;
public static final String hostOne = "localhost";
public static final int portOne = 1231;

public static final String hostTwo = "localhost";
public static final int portTwo = 1232;

}
Expand Up @@ -22,8 +22,6 @@
import io.netty.example.udt.util.ThreadFactoryUDT;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import io.netty.logging.InternalLoggerFactory;
import io.netty.logging.Slf4JLoggerFactory;
import io.netty.transport.udt.UdtChannel;
import io.netty.transport.udt.nio.NioUdtProvider;

Expand All @@ -44,16 +42,6 @@ public abstract class MsgEchoPeerBase {
protected static final Logger log = LoggerFactory
.getLogger(MsgEchoPeerBase.class);

/**
* use slf4j provider for io.netty.logging.InternalLogger
*/
static {
final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
InternalLoggerFactory.setDefaultFactory(defaultFactory);
log.info("InternalLoggerFactory={}", InternalLoggerFactory
.getDefaultFactory().getClass().getName());
}

protected final int messageSize;
protected final InetSocketAddress self;
protected final InetSocketAddress peer;
Expand Down
Expand Up @@ -15,7 +15,7 @@
*/

/**
* examples form netty project adapted for udt
* Examples show how to use UDT Message Rendezvous.
*/
package io.netty.example.udt.echo.rendevous;

Expand Up @@ -15,7 +15,7 @@
*/

/**
* examples form netty project adapted for udt
* Examples show how to use UDT.
*/
package io.netty.example.udt;

Expand Up @@ -19,7 +19,9 @@
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;

/** */
/**
* Custom thread factory to use with examples.
*/
public class ThreadFactoryUDT implements ThreadFactory {

private static final AtomicInteger counter = new AtomicInteger();
Expand All @@ -32,8 +34,8 @@ public ThreadFactoryUDT(final String name) {

@Override
public Thread newThread(final Runnable runnable) {
return new Thread(//
runnable, "udt-" + name + "-" + counter.getAndIncrement());
return new Thread(runnable, "udt-" + name + "-"
+ counter.getAndIncrement());
};

}
Expand Up @@ -15,7 +15,7 @@
*/

/**
* examples form netty project adapted for udt
* Utilities for UDT examples.
*/
package io.netty.example.udt.util;

43 changes: 0 additions & 43 deletions transport-udt/build/maven-install-quick.ant

This file was deleted.

40 changes: 0 additions & 40 deletions transport-udt/build/maven-install.ant

This file was deleted.

40 changes: 0 additions & 40 deletions transport-udt/build/maven-test.ant

This file was deleted.

24 changes: 15 additions & 9 deletions transport-udt/pom.xml
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright 2012 The Netty Project ~ ~ The Netty Project licenses this
file to you under the Apache License, ~ version 2.0 (the "License"); you
may not use this file except in compliance ~ with the License. You may obtain
a copy of the License at: ~ ~ http://www.apache.org/licenses/LICENSE-2.0
~ ~ Unless required by applicable law or agreed to in writing, software ~
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
~ License for the specific language governing permissions and limitations
~ under the License. -->
<!--
~ Copyright 2012 The Netty Project
~
~ The Netty Project licenses this file to you under the Apache License,
~ version 2.0 (the "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at:
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
~ License for the specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

Expand Down

0 comments on commit d651a48

Please sign in to comment.