@Test(timeout=20000) public void testSetMaxFrameSize() throws Exception { try (TestAmqpPeer testPeer = new TestAmqpPeer()) { testPeer.expectSaslAnonymous(); provider = new AmqpProviderFactory().createProvider(getPeerURI(testPeer)); TransportImpl transport = (TransportImpl) provider.getProtonTransport(); final int NEW_MAX_FRAME_SIZE = provider.getMaxFrameSize() + 500; provider.setMaxFrameSize(NEW_MAX_FRAME_SIZE); provider.connect(connectionInfo); assertEquals(NEW_MAX_FRAME_SIZE, transport.getMaxFrameSize()); testPeer.expectOpen(); testPeer.expectClose(); provider.close(); testPeer.waitForAllHandlersToComplete(1000); } }
public void setMaxFrameSize(int maxFrameSize) { this.maxFrameSize = maxFrameSize; }
AmqpProvider implements Provider, TransportListener , AmqpResourceParent { public void setMaxFrameSize(int maxFrameSize) { this.maxFrameSize = maxFrameSize; } }
AmqpProvider implements Provider, TransportListener , AmqpResourceParent { public void setMaxFrameSize(int maxFrameSize) { this.maxFrameSize = maxFrameSize; } AmqpProvider(URI remoteURI, Transport transport, ProviderFutureFactory futureFactory); }
AmqpProvider implements Provider, TransportListener , AmqpResourceParent { public void setMaxFrameSize(int maxFrameSize) { this.maxFrameSize = maxFrameSize; } AmqpProvider(URI remoteURI, Transport transport, ProviderFutureFactory futureFactory); @Override void connect(final JmsConnectionInfo connectionInfo); @Override void start(); @Override void close(); @Override void create(final JmsResource resource, final AsyncResult request); @Override void start(final JmsResource resource, final AsyncResult request); @Override void stop(final JmsResource resource, final AsyncResult request); @Override void destroy(final JmsResource resource, final AsyncResult request); @Override void send(final JmsOutboundMessageDispatch envelope, final AsyncResult request); @Override void acknowledge(final JmsSessionId sessionId, final ACK_TYPE ackType, final AsyncResult request); @Override void acknowledge(final JmsInboundMessageDispatch envelope, final ACK_TYPE ackType, final AsyncResult request); @Override void commit(final JmsTransactionInfo transactionInfo, JmsTransactionInfo nextTransactionId, final AsyncResult request); @Override void rollback(final JmsTransactionInfo transactionInfo, JmsTransactionInfo nextTransactionId, final AsyncResult request); @Override void recover(final JmsSessionId sessionId, final AsyncResult request); @Override void unsubscribe(final String subscription, final AsyncResult request); @Override void pull(final JmsConsumerId consumerId, final long timeout, final AsyncResult request); void scheduleExecuteAndPump(Runnable task); @Override void onData(final ByteBuf input); @Override void onTransportError(final Throwable error); @Override void onTransportClosed(); @Override void addChildResource(AmqpResource resource); @Override void removeChildResource(AmqpResource resource); @Override JmsMessageFactory getMessageFactory(); @Override ProviderFuture newProviderFuture(); @Override ProviderFuture newProviderFuture(ProviderSynchronization synchronization); void setTraceFrames(boolean trace); boolean isTraceFrames(); int getTraceFramesPayloadLimit(); void setTraceFramesPayloadLimit(int traceFramesPayloadLimit); void setTraceBytes(boolean trace); boolean isTraceBytes(); boolean isSaslLayer(); void setSaslLayer(boolean saslLayer); Set<String> getSaslMechanisms(); void setSaslMechanisms(String[] saslMechanisms); String getVhost(); void setVhost(String vhost); int getIdleTimeout(); void setIdleTimeout(int idleTimeout); int getDrainTimeout(); void setDrainTimeout(int drainTimeout); int getMaxFrameSize(); int getMaxWriteBytesBeforeFlush(); void setMaxWriteBytesBeforeFlush(int maxWriteBytesBeforeFlush); int getAnonymousFallbackCacheSize(); void setAnonymousFallbackCacheSize(int size); int getAnonymousFallbackCacheTimeout(); void setAnonymousFallbackCacheTimeout(int timeout); void setMaxFrameSize(int maxFrameSize); long getSessionOutgoingWindow(); void setSessionOutgoingWindow(long sessionOutoingWindow); boolean isAllowNonSecureRedirects(); void setAllowNonSecureRedirects(boolean allowNonSecureRedirects); long getCloseTimeout(); long getConnectTimeout(); long getRequestTimeout(); long getSendTimeout(); @Override String toString(); int getChannelMax(); void setChannelMax(int channelMax); Transport getTransport(); @Override void setProviderListener(ProviderListener listener); @Override ProviderListener getProviderListener(); @Override URI getRemoteURI(); Throwable getFailureCause(); boolean isFailed(); @Override List<URI> getAlternateURIs(); org.apache.qpid.proton.engine.Transport getProtonTransport(); Connection getProtonConnection(); @Override AmqpProvider getProvider(); ScheduledFuture<?> scheduleRequestTimeout(final AsyncResult request, long timeout, final ProviderException error); ScheduledFuture<?> scheduleRequestTimeout(final AsyncResult request, long timeout, final AmqpExceptionBuilder builder); }
AmqpProvider implements Provider, TransportListener , AmqpResourceParent { public void setMaxFrameSize(int maxFrameSize) { this.maxFrameSize = maxFrameSize; } AmqpProvider(URI remoteURI, Transport transport, ProviderFutureFactory futureFactory); @Override void connect(final JmsConnectionInfo connectionInfo); @Override void start(); @Override void close(); @Override void create(final JmsResource resource, final AsyncResult request); @Override void start(final JmsResource resource, final AsyncResult request); @Override void stop(final JmsResource resource, final AsyncResult request); @Override void destroy(final JmsResource resource, final AsyncResult request); @Override void send(final JmsOutboundMessageDispatch envelope, final AsyncResult request); @Override void acknowledge(final JmsSessionId sessionId, final ACK_TYPE ackType, final AsyncResult request); @Override void acknowledge(final JmsInboundMessageDispatch envelope, final ACK_TYPE ackType, final AsyncResult request); @Override void commit(final JmsTransactionInfo transactionInfo, JmsTransactionInfo nextTransactionId, final AsyncResult request); @Override void rollback(final JmsTransactionInfo transactionInfo, JmsTransactionInfo nextTransactionId, final AsyncResult request); @Override void recover(final JmsSessionId sessionId, final AsyncResult request); @Override void unsubscribe(final String subscription, final AsyncResult request); @Override void pull(final JmsConsumerId consumerId, final long timeout, final AsyncResult request); void scheduleExecuteAndPump(Runnable task); @Override void onData(final ByteBuf input); @Override void onTransportError(final Throwable error); @Override void onTransportClosed(); @Override void addChildResource(AmqpResource resource); @Override void removeChildResource(AmqpResource resource); @Override JmsMessageFactory getMessageFactory(); @Override ProviderFuture newProviderFuture(); @Override ProviderFuture newProviderFuture(ProviderSynchronization synchronization); void setTraceFrames(boolean trace); boolean isTraceFrames(); int getTraceFramesPayloadLimit(); void setTraceFramesPayloadLimit(int traceFramesPayloadLimit); void setTraceBytes(boolean trace); boolean isTraceBytes(); boolean isSaslLayer(); void setSaslLayer(boolean saslLayer); Set<String> getSaslMechanisms(); void setSaslMechanisms(String[] saslMechanisms); String getVhost(); void setVhost(String vhost); int getIdleTimeout(); void setIdleTimeout(int idleTimeout); int getDrainTimeout(); void setDrainTimeout(int drainTimeout); int getMaxFrameSize(); int getMaxWriteBytesBeforeFlush(); void setMaxWriteBytesBeforeFlush(int maxWriteBytesBeforeFlush); int getAnonymousFallbackCacheSize(); void setAnonymousFallbackCacheSize(int size); int getAnonymousFallbackCacheTimeout(); void setAnonymousFallbackCacheTimeout(int timeout); void setMaxFrameSize(int maxFrameSize); long getSessionOutgoingWindow(); void setSessionOutgoingWindow(long sessionOutoingWindow); boolean isAllowNonSecureRedirects(); void setAllowNonSecureRedirects(boolean allowNonSecureRedirects); long getCloseTimeout(); long getConnectTimeout(); long getRequestTimeout(); long getSendTimeout(); @Override String toString(); int getChannelMax(); void setChannelMax(int channelMax); Transport getTransport(); @Override void setProviderListener(ProviderListener listener); @Override ProviderListener getProviderListener(); @Override URI getRemoteURI(); Throwable getFailureCause(); boolean isFailed(); @Override List<URI> getAlternateURIs(); org.apache.qpid.proton.engine.Transport getProtonTransport(); Connection getProtonConnection(); @Override AmqpProvider getProvider(); ScheduledFuture<?> scheduleRequestTimeout(final AsyncResult request, long timeout, final ProviderException error); ScheduledFuture<?> scheduleRequestTimeout(final AsyncResult request, long timeout, final AmqpExceptionBuilder builder);  }