combine ConfigurationHolder and ConfigurationCustomizer
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
f35a01c73c
commit
bc88224f19
|
@ -79,16 +79,16 @@ public interface Configuration
|
|||
void customize(Configuration configurable);
|
||||
}
|
||||
|
||||
class ConfigurationHolder implements Configuration
|
||||
class ConfigurationCustomizer implements Configuration, Customizer
|
||||
{
|
||||
protected Duration idleTimeout;
|
||||
protected Duration writeTimeout;
|
||||
protected Boolean autoFragment;
|
||||
protected Long maxFrameSize;
|
||||
protected Integer outputBufferSize;
|
||||
protected Integer inputBufferSize;
|
||||
protected Long maxBinaryMessageSize;
|
||||
protected Long maxTextMessageSize;
|
||||
private Duration idleTimeout;
|
||||
private Duration writeTimeout;
|
||||
private Boolean autoFragment;
|
||||
private Long maxFrameSize;
|
||||
private Integer outputBufferSize;
|
||||
private Integer inputBufferSize;
|
||||
private Long maxBinaryMessageSize;
|
||||
private Long maxTextMessageSize;
|
||||
|
||||
@Override
|
||||
public Duration getIdleTimeout()
|
||||
|
@ -185,10 +185,7 @@ public interface Configuration
|
|||
{
|
||||
this.maxTextMessageSize = maxTextMessageSize;
|
||||
}
|
||||
}
|
||||
|
||||
class ConfigurationCustomizer extends ConfigurationHolder implements Customizer
|
||||
{
|
||||
@Override
|
||||
public void customize(Configuration configurable)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ public class FragmentExtension extends AbstractExtension
|
|||
private static final Logger LOG = Log.getLogger(FragmentExtension.class);
|
||||
|
||||
private final FragmentingFlusher flusher;
|
||||
private final Configuration configuration = new Configuration.ConfigurationHolder();
|
||||
private final Configuration configuration = new Configuration.ConfigurationCustomizer();
|
||||
|
||||
public FragmentExtension()
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.eclipse.jetty.util.log.Log;
|
|||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.websocket.core.CloseStatus;
|
||||
import org.eclipse.jetty.websocket.core.Configuration;
|
||||
import org.eclipse.jetty.websocket.core.Configuration.ConfigurationHolder;
|
||||
import org.eclipse.jetty.websocket.core.Frame;
|
||||
import org.eclipse.jetty.websocket.core.OpCode;
|
||||
import org.eclipse.jetty.websocket.core.exception.MessageTooLargeException;
|
||||
|
@ -65,7 +64,7 @@ public class Parser
|
|||
|
||||
public Parser(ByteBufferPool bufferPool)
|
||||
{
|
||||
this(bufferPool, new ConfigurationHolder());
|
||||
this(bufferPool, new Configuration.ConfigurationCustomizer());
|
||||
}
|
||||
|
||||
public Parser(ByteBufferPool bufferPool, Configuration configuration)
|
||||
|
|
Loading…
Reference in New Issue