@Override public Collection<Object> getBeans() { return getBeans(Object.class); }
/** * @param clazz the class of the beans * @param <T> the Bean type * @param beans the collection to add beans of the given class from the entire managed hierarchy */ protected <T> void getContainedBeans(Class<T> clazz, Collection<T> beans) { beans.addAll(getBeans(clazz)); for (Container c : getBeans(Container.class)) { Bean bean = getBean(c); if (bean!=null && bean.isManageable()) { if (c instanceof ContainerLifeCycle) ((ContainerLifeCycle)c).getContainedBeans(clazz, beans); else beans.addAll(c.getContainedBeans(clazz)); } } } }
@Override public Collection<Object> getBeans() { return getBeans(Object.class); }
@Override public Collection<Object> getBeans() { return getBeans(Object.class); }
@Override public Collection<Object> getBeans() { return getBeans(Object.class); }
@Override public Collection<Object> getBeans() { return getBeans(Object.class); }
public default Connection customize(Connection connection, Map<String, Object> context) { ContainerLifeCycle connector = (ContainerLifeCycle)context.get(CONNECTOR_CONTEXT_KEY); connector.getBeans(Connection.Listener.class).forEach(connection::addListener); return connection; } }
public default Connection customize(Connection connection, Map<String, Object> context) { ContainerLifeCycle connector = (ContainerLifeCycle)context.get(CONNECTOR_CONTEXT_KEY); connector.getBeans(Connection.Listener.class).forEach(connection::addListener); return connection; } }
@Override protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { if (connection instanceof SslConnection) { SslConnection sslConnection = (SslConnection)connection; if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle container = (ContainerLifeCycle)connector; container.getBeans(SslHandshakeListener.class).forEach(sslConnection::addHandshakeListener); } getBeans(SslHandshakeListener.class).forEach(sslConnection::addHandshakeListener); } return super.configure(connection, connector, endPoint); }
/** * @param clazz the class of the beans * @param <T> the Bean type * @param beans the collection to add beans of the given class from the entire managed hierarchy */ protected <T> void getContainedBeans(Class<T> clazz, Collection<T> beans) { beans.addAll(getBeans(clazz)); for (Container c : getBeans(Container.class)) { Bean bean = getBean(c); if (bean!=null && bean.isManageable()) { if (c instanceof ContainerLifeCycle) ((ContainerLifeCycle)c).getContainedBeans(clazz, beans); else beans.addAll(c.getContainedBeans(clazz)); } } } }
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { connection.setInputBufferSize(getInputBufferSize()); if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle aggregate = (ContainerLifeCycle)connector; for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class)) connection.addListener(listener); } return connection; }
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { connection.setInputBufferSize(getInputBufferSize()); if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle aggregate = (ContainerLifeCycle)connector; for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class)) connection.addListener(listener); } return connection; }
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { connection.setInputBufferSize(getInputBufferSize()); if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle aggregate = (ContainerLifeCycle)connector; for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class)) connection.addListener(listener); } return connection; }
@Override public Connection customize(Connection connection, Map<String, Object> context) { if (connection instanceof SslConnection) { SslConnection sslConnection = (SslConnection)connection; sslConnection.setRenegotiationAllowed(sslContextFactory.isRenegotiationAllowed()); sslConnection.setRenegotiationLimit(sslContextFactory.getRenegotiationLimit()); sslConnection.setAllowMissingCloseMessage(isAllowMissingCloseMessage()); ContainerLifeCycle connector = (ContainerLifeCycle)context.get(ClientConnectionFactory.CONNECTOR_CONTEXT_KEY); connector.getBeans(SslHandshakeListener.class).forEach(sslConnection::addHandshakeListener); } return ClientConnectionFactory.super.customize(connection, context); } }
@Override public Connection customize(Connection connection, Map<String, Object> context) { if (connection instanceof SslConnection) { SslConnection sslConnection = (SslConnection)connection; sslConnection.setRenegotiationAllowed(sslContextFactory.isRenegotiationAllowed()); sslConnection.setRenegotiationLimit(sslContextFactory.getRenegotiationLimit()); sslConnection.setAllowMissingCloseMessage(isAllowMissingCloseMessage()); ContainerLifeCycle connector = (ContainerLifeCycle)context.get(ClientConnectionFactory.CONNECTOR_CONTEXT_KEY); connector.getBeans(SslHandshakeListener.class).forEach(sslConnection::addHandshakeListener); } return ClientConnectionFactory.super.customize(connection, context); } }
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { connection.setInputBufferSize(getInputBufferSize()); // Add Connection.Listeners from Connector if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle aggregate = (ContainerLifeCycle)connector; for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class)) connection.addListener(listener); } // Add Connection.Listeners from this factory for (Connection.Listener listener : getBeans(Connection.Listener.class)) connection.addListener(listener); return connection; }
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { connection.setInputBufferSize(getInputBufferSize()); // Add Connection.Listeners from Connector if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle aggregate = (ContainerLifeCycle)connector; for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class)) connection.addListener(listener); } // Add Connection.Listeners from this factory for (Connection.Listener listener : getBeans(Connection.Listener.class)) connection.addListener(listener); return connection; }
container.getBeans(SslHandshakeListener.class).forEach(sslConnection::addHandshakeListener);