Clean up class + param order consistency

This commit is contained in:
Joakim Erdfelt 2013-09-26 10:30:29 -07:00
parent b966545a95
commit 1ccba6e172
1 changed files with 9 additions and 8 deletions

View File

@ -84,17 +84,17 @@ public class WebSocketClient extends ContainerLifeCycle
public WebSocketClient(Executor executor) public WebSocketClient(Executor executor)
{ {
this(executor,null); this(null,executor);
} }
public WebSocketClient(SslContextFactory sslContextFactory) public WebSocketClient(SslContextFactory sslContextFactory)
{ {
this(null,sslContextFactory); this(sslContextFactory,null);
} }
public WebSocketClient(Executor executor, SslContextFactory sslContextFactory) public WebSocketClient(SslContextFactory sslContextFactory, Executor executor)
{ {
this.executor=executor; this.executor = executor;
this.sslContextFactory = sslContextFactory; this.sslContextFactory = sslContextFactory;
this.policy = WebSocketPolicy.newClientPolicy(); this.policy = WebSocketPolicy.newClientPolicy();
this.bufferPool = new MappedByteBufferPool(); this.bufferPool = new MappedByteBufferPool();
@ -104,7 +104,6 @@ public class WebSocketClient extends ContainerLifeCycle
this.sessionFactory = new WebSocketSessionFactory(); this.sessionFactory = new WebSocketSessionFactory();
} }
public Future<Session> connect(Object websocket, URI toUri) throws IOException public Future<Session> connect(Object websocket, URI toUri) throws IOException
{ {
ClientUpgradeRequest request = new ClientUpgradeRequest(toUri); ClientUpgradeRequest request = new ClientUpgradeRequest(toUri);
@ -208,8 +207,10 @@ public class WebSocketClient extends ContainerLifeCycle
addBean(executor,true); addBean(executor,true);
} }
else else
{
addBean(executor,false); addBean(executor,false);
}
if (connectionManager != null) if (connectionManager != null)
{ {
return; return;