Issue #3730 - EventDriverFactory and SessionFactory setters
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
26fde02c55
commit
c2c2c56a02
|
@ -183,8 +183,12 @@ public class ClientContainer extends ContainerLifeCycle implements WebSocketCont
|
|||
*/
|
||||
public ClientContainer(WebSocketClient client)
|
||||
{
|
||||
Objects.requireNonNull(client, "WebSocketClient");
|
||||
this.scopeDelegate = client;
|
||||
this.client = client;
|
||||
addBean(this.client);
|
||||
this.client.setEventDriverFactory(new JsrEventDriverFactory(scopeDelegate));
|
||||
this.client.setSessionFactory(new JsrSessionFactory(this));
|
||||
this.internalClient = false;
|
||||
|
||||
this.endpointClientMetadataCache = new ConcurrentHashMap<>();
|
||||
|
|
|
@ -76,10 +76,10 @@ public class WebSocketClient extends ContainerLifeCycle implements WebSocketCont
|
|||
// WebSocket Specifics
|
||||
private final WebSocketPolicy policy;
|
||||
private final WebSocketExtensionFactory extensionRegistry;
|
||||
private final EventDriverFactory eventDriverFactory;
|
||||
private final SessionFactory sessionFactory;
|
||||
private final SessionTracker sessionTracker = new SessionTracker();
|
||||
private final List<WebSocketSessionListener> sessionListeners = new ArrayList<>();
|
||||
private EventDriverFactory eventDriverFactory;
|
||||
private SessionFactory sessionFactory;
|
||||
|
||||
// defaults to true for backwards compatibility
|
||||
private boolean stopAtShutdown = true;
|
||||
|
@ -379,6 +379,16 @@ public class WebSocketClient extends ContainerLifeCycle implements WebSocketCont
|
|||
return wsReq.sendAsync();
|
||||
}
|
||||
|
||||
public void setEventDriverFactory(EventDriverFactory eventDriverFactory)
|
||||
{
|
||||
this.eventDriverFactory = eventDriverFactory;
|
||||
}
|
||||
|
||||
public void setSessionFactory(SessionFactory sessionFactory)
|
||||
{
|
||||
this.sessionFactory = sessionFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue