Fixing naming
This commit is contained in:
parent
54e9c312ab
commit
cae79aabc5
|
@ -35,7 +35,7 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
|||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.eclipse.jetty.util.thread.TimerScheduler;
|
||||
import org.eclipse.jetty.websocket.client.internal.ConnectionManager;
|
||||
import org.eclipse.jetty.websocket.client.internal.IWebSocketClient;
|
||||
import org.eclipse.jetty.websocket.client.internal.DefaultWebSocketClient;
|
||||
import org.eclipse.jetty.websocket.core.api.Extension;
|
||||
import org.eclipse.jetty.websocket.core.api.ExtensionRegistry;
|
||||
import org.eclipse.jetty.websocket.core.api.WebSocketPolicy;
|
||||
|
@ -190,7 +190,7 @@ public class WebSocketClientFactory extends ContainerLifeCycle
|
|||
{
|
||||
LOG.debug("Creating new WebSocket for {}",websocketPojo);
|
||||
EventDriver websocket = eventDriverFactory.wrap(websocketPojo);
|
||||
return new IWebSocketClient(this,websocket);
|
||||
return new DefaultWebSocketClient(this,websocket);
|
||||
}
|
||||
|
||||
public boolean sessionClosed(WebSocketSession session)
|
||||
|
@ -204,17 +204,6 @@ public class WebSocketClientFactory extends ContainerLifeCycle
|
|||
{
|
||||
LOG.debug("Session Opened: {}",session);
|
||||
}
|
||||
// FIXME: what is going on?
|
||||
// if (!isRunning())
|
||||
// {
|
||||
// LOG.debug("Factory.isRunning: {}",this.isRunning());
|
||||
// LOG.debug("Factory.isStarted: {}",this.isStarted());
|
||||
// LOG.debug("Factory.isStarting: {}",this.isStarting());
|
||||
// LOG.debug("Factory.isStopped: {}",this.isStopped());
|
||||
// LOG.debug("Factory.isStopping: {}",this.isStopping());
|
||||
// LOG.warn("Factory is not running");
|
||||
// return false;
|
||||
// }
|
||||
boolean ret = sessions.offer(session);
|
||||
session.onConnect();
|
||||
return ret;
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ConnectionManager extends ContainerLifeCycle
|
|||
}
|
||||
}
|
||||
|
||||
public FutureCallback<UpgradeResponse> connectPhysical(IWebSocketClient client) throws IOException
|
||||
public FutureCallback<UpgradeResponse> connectPhysical(DefaultWebSocketClient client) throws IOException
|
||||
{
|
||||
SocketChannel channel = SocketChannel.open();
|
||||
SocketAddress bindAddress = client.getFactory().getBindAddress();
|
||||
|
|
|
@ -38,9 +38,9 @@ import org.eclipse.jetty.websocket.core.io.event.EventDriver;
|
|||
/**
|
||||
* WebSocketClient for working with Upgrade (request and response), and establishing connections to the websocket URI of your choice.
|
||||
*/
|
||||
public class IWebSocketClient extends FutureCallback<UpgradeResponse> implements WebSocketClient
|
||||
public class DefaultWebSocketClient extends FutureCallback<UpgradeResponse> implements WebSocketClient
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(IWebSocketClient.class);
|
||||
private static final Logger LOG = Log.getLogger(DefaultWebSocketClient.class);
|
||||
|
||||
private final WebSocketClientFactory factory;
|
||||
private final WebSocketPolicy policy;
|
||||
|
@ -57,7 +57,7 @@ public class IWebSocketClient extends FutureCallback<UpgradeResponse> implements
|
|||
private ClientUpgradeResponse upgradeResponse;
|
||||
private Masker masker;
|
||||
|
||||
public IWebSocketClient(WebSocketClientFactory factory, EventDriver websocket)
|
||||
public DefaultWebSocketClient(WebSocketClientFactory factory, EventDriver websocket)
|
||||
{
|
||||
this.factory = factory;
|
||||
LOG.debug("factory.isRunning(): {}",factory.isRunning());
|
|
@ -23,7 +23,7 @@ import java.util.concurrent.Executor;
|
|||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.websocket.client.WebSocketClientFactory;
|
||||
import org.eclipse.jetty.websocket.client.internal.IWebSocketClient;
|
||||
import org.eclipse.jetty.websocket.client.internal.DefaultWebSocketClient;
|
||||
import org.eclipse.jetty.websocket.client.masks.Masker;
|
||||
import org.eclipse.jetty.websocket.core.io.AbstractWebSocketConnection;
|
||||
import org.eclipse.jetty.websocket.core.protocol.WebSocketFrame;
|
||||
|
@ -34,11 +34,11 @@ import org.eclipse.jetty.websocket.core.protocol.WebSocketFrame;
|
|||
public class WebSocketClientConnection extends AbstractWebSocketConnection
|
||||
{
|
||||
private final WebSocketClientFactory factory;
|
||||
private final IWebSocketClient client;
|
||||
private final DefaultWebSocketClient client;
|
||||
private final Masker masker;
|
||||
private boolean connected;
|
||||
|
||||
public WebSocketClientConnection(EndPoint endp, Executor executor, IWebSocketClient client)
|
||||
public WebSocketClientConnection(EndPoint endp, Executor executor, DefaultWebSocketClient client)
|
||||
{
|
||||
super(endp,executor,client.getFactory().getScheduler(),client.getPolicy(),client.getFactory().getBufferPool());
|
||||
this.client = client;
|
||||
|
@ -47,7 +47,7 @@ public class WebSocketClientConnection extends AbstractWebSocketConnection
|
|||
this.masker = client.getMasker();
|
||||
}
|
||||
|
||||
public IWebSocketClient getClient()
|
||||
public DefaultWebSocketClient getClient()
|
||||
{
|
||||
return client;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.eclipse.jetty.websocket.client.WebSocketClientFactory;
|
||||
import org.eclipse.jetty.websocket.client.internal.IWebSocketClient;
|
||||
import org.eclipse.jetty.websocket.client.internal.DefaultWebSocketClient;
|
||||
import org.eclipse.jetty.websocket.core.api.WebSocketPolicy;
|
||||
|
||||
public class WebSocketClientSelectorManager extends SelectorManager
|
||||
|
@ -61,7 +61,7 @@ public class WebSocketClientSelectorManager extends SelectorManager
|
|||
public Connection newConnection(final SocketChannel channel, EndPoint endPoint, final Object attachment) throws IOException
|
||||
{
|
||||
LOG.debug("newConnection({},{},{})",channel,endPoint,attachment);
|
||||
IWebSocketClient client = (IWebSocketClient)attachment;
|
||||
DefaultWebSocketClient client = (DefaultWebSocketClient)attachment;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ public class WebSocketClientSelectorManager extends SelectorManager
|
|||
return engine;
|
||||
}
|
||||
|
||||
public UpgradeConnection newUpgradeConnection(SocketChannel channel, EndPoint endPoint, IWebSocketClient client)
|
||||
public UpgradeConnection newUpgradeConnection(SocketChannel channel, EndPoint endPoint, DefaultWebSocketClient client)
|
||||
{
|
||||
WebSocketClientFactory factory = client.getFactory();
|
||||
Executor executor = factory.getExecutor();
|
||||
|
|
Loading…
Reference in New Issue