Permalink
Browse files

Using named parameters for booleans

  • Loading branch information...
1 parent 01e3c5f commit e399aefe3dac000ab9ba73947ec439e4cec9f210 Endre Sándor Varga committed Jan 3, 2013
@@ -11,7 +11,7 @@ import com.typesafe.config.Config
import java.net.{ UnknownHostException, SocketAddress, InetAddress, InetSocketAddress, ConnectException }
import java.util.concurrent.{ ConcurrentHashMap, Executor, Executors, CancellationException }
import org.jboss.netty.bootstrap.{ ConnectionlessBootstrap, Bootstrap, ClientBootstrap, ServerBootstrap }
-import org.jboss.netty.buffer.{ChannelBuffers, ChannelBuffer}
+import org.jboss.netty.buffer.{ ChannelBuffers, ChannelBuffer }
import org.jboss.netty.channel._
import org.jboss.netty.channel.group.{ ChannelGroupFuture, ChannelGroupFutureListener }
import org.jboss.netty.channel.socket.nio.{ NioDatagramChannelFactory, NioServerSocketChannelFactory, NioClientSocketChannelFactory }
@@ -241,7 +241,7 @@ class NettyTransport(private val settings: NettyTransportSettings, private val s
private val serverPipelineFactory: ChannelPipelineFactory = new ChannelPipelineFactory {
override def getPipeline: ChannelPipeline = {
val pipeline = newPipeline
- if (EnableSsl) pipeline.addFirst("SslHandler", sslHandler(false))
+ if (EnableSsl) pipeline.addFirst("SslHandler", sslHandler(isClient = false))
val handler = if (isDatagram) new UdpServerHandler(NettyTransport.this, associationListenerPromise.future)
else new TcpServerHandler(NettyTransport.this, associationListenerPromise.future)
pipeline.addLast("ServerHandler", handler)
@@ -252,7 +252,7 @@ class NettyTransport(private val settings: NettyTransportSettings, private val s
private def clientPipelineFactory(statusPromise: Promise[AssociationHandle]): ChannelPipelineFactory = new ChannelPipelineFactory {
override def getPipeline: ChannelPipeline = {
val pipeline = newPipeline
- if (EnableSsl) pipeline.addFirst("SslHandler", sslHandler(true))
+ if (EnableSsl) pipeline.addFirst("SslHandler", sslHandler(isClient = true))
val handler = if (isDatagram) new UdpClientHandler(NettyTransport.this, statusPromise)
else new TcpClientHandler(NettyTransport.this, statusPromise)
pipeline.addLast("clienthandler", handler)
@@ -35,7 +35,7 @@ private[remote] trait UdpHandlers extends CommonHandlers {
} else {
val listener = transport.udpConnectionTable.get(inetSocketAddress)
val bytes: Array[Byte] = e.getMessage.asInstanceOf[ChannelBuffer].array()
- if (bytes.length > 0)listener notify InboundPayload(ByteString(bytes))
+ if (bytes.length > 0) listener notify InboundPayload(ByteString(bytes))
}
case _
}

0 comments on commit e399aef

Please sign in to comment.