/** * @param _executionFactory the {@link ExecutionStrategy.Factory} used by {@link ManagedSelector} */ public void setExecutionStrategyFactory(ExecutionStrategy.Factory _executionFactory) { if (isRunning()) throw new IllegalStateException("Cannot change " + ExecutionStrategy.Factory.class.getSimpleName() + " after start()"); this._executionFactory = _executionFactory; }
public void removeEventListener(EventListener listener) { if (isRunning()) throw new IllegalStateException(this.toString()); if (listener instanceof AcceptListener) removeAcceptListener(AcceptListener.class.cast(listener)); }
public void addEventListener(EventListener listener) { if (isRunning()) throw new IllegalStateException(this.toString()); if (listener instanceof AcceptListener) addAcceptListener(AcceptListener.class.cast(listener)); }
public void removeEventListener(EventListener listener) { if (isRunning()) throw new IllegalStateException(this.toString()); if (listener instanceof AcceptListener) removeAcceptListener(AcceptListener.class.cast(listener)); }
public void addEventListener(EventListener listener) { if (isRunning()) throw new IllegalStateException(this.toString()); if (listener instanceof AcceptListener) addAcceptListener(AcceptListener.class.cast(listener)); }
/** * <p>Callback method invoked when a connection is opened.</p> * * @param connection the connection just opened */ public void connectionOpened(Connection connection) { try { connection.onOpen(); } catch (Throwable x) { if (isRunning()) LOG.warn("Exception while notifying connection " + connection, x); else LOG.debug("Exception while notifying connection " + connection, x); throw x; } }
/** * <p>Callback method invoked when a connection is opened.</p> * * @param connection the connection just opened */ public void connectionOpened(Connection connection) { try { connection.onOpen(); } catch (Throwable x) { if (isRunning()) LOG.warn("Exception while notifying connection " + connection, x); else LOG.debug("Exception while notifying connection " + connection, x); throw x; } }
/** * <p>Callback method invoked when a connection is opened.</p> * * @param connection the connection just opened */ public void connectionOpened(Connection connection) { try { connection.onOpen(); } catch (Throwable x) { if (isRunning()) LOG.warn("Exception while notifying connection " + connection, x); else LOG.debug("Exception while notifying connection " + connection, x); throw x; } }
/** * <p>Callback method invoked when a connection is opened.</p> * * @param connection the connection just opened */ public void connectionOpened(Connection connection) { try { connection.onOpen(); } catch (Throwable x) { if (isRunning()) LOG.warn("Exception while notifying connection " + connection, x); else LOG.debug("Exception while notifying connection " + connection, x); throw x; } }