Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java')
-rw-r--r--jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java147
1 files changed, 111 insertions, 36 deletions
diff --git a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java
index d84f0172b1..58dbc8a9aa 100644
--- a/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java
+++ b/jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java
@@ -1,47 +1,53 @@
-/*
- * Copyright (c) 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+//========================================================================
+//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
+//------------------------------------------------------------------------
+//All rights reserved. This program and the accompanying materials
+//are made available under the terms of the Eclipse Public License v1.0
+//and Apache License v2.0 which accompanies this distribution.
+//The Eclipse Public License is available at
+//http://www.eclipse.org/legal/epl-v10.html
+//The Apache License v2.0 is available at
+//http://www.opensource.org/licenses/apache2.0.php
+//You may elect to redistribute this code under either of these licenses.
+//========================================================================
+
package org.eclipse.jetty.spdy;
import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-import org.eclipse.jetty.io.AsyncConnection;
import org.eclipse.jetty.io.AsyncEndPoint;
-import org.eclipse.jetty.io.IOFuture;
+import org.eclipse.jetty.io.Buffer;
+import org.eclipse.jetty.io.Connection;
+import org.eclipse.jetty.util.thread.Timeout;
public class EmptyAsyncEndPoint implements AsyncEndPoint
{
private boolean checkForIdle;
- private AsyncConnection connection;
+ private Connection connection;
private boolean oshut;
+ private boolean ishut;
private boolean closed;
private int maxIdleTime;
@Override
- public long getCreatedTimeStamp()
+ public void dispatch()
+ {
+ }
+
+ @Override
+ public void asyncDispatch()
{
- return 0;
}
@Override
- public long getIdleTimestamp()
+ public void scheduleWrite()
+ {
+ }
+
+ @Override
+ public void onIdleExpired(long idleForMs)
{
- return 0;
}
@Override
@@ -57,19 +63,41 @@ public class EmptyAsyncEndPoint implements AsyncEndPoint
}
@Override
- public AsyncConnection getAsyncConnection()
+ public boolean isWritable()
+ {
+ return false;
+ }
+
+ @Override
+ public boolean hasProgressed()
+ {
+ return false;
+ }
+
+ @Override
+ public void scheduleTimeout(Timeout.Task task, long timeoutMs)
+ {
+ }
+
+ @Override
+ public void cancelTimeout(Timeout.Task task)
+ {
+ }
+
+ @Override
+ public Connection getConnection()
{
return connection;
}
@Override
- public void setAsyncConnection(AsyncConnection connection)
+ public void setConnection(Connection connection)
{
this.connection = connection;
}
@Override
- public void shutdownOutput()
+ public void shutdownOutput() throws IOException
{
oshut = true;
}
@@ -81,54 +109,96 @@ public class EmptyAsyncEndPoint implements AsyncEndPoint
}
@Override
+ public void shutdownInput() throws IOException
+ {
+ ishut = true;
+ }
+
+ @Override
public boolean isInputShutdown()
{
- return false;
+ return ishut;
}
@Override
- public void close()
+ public void close() throws IOException
{
closed = true;
}
@Override
- public int fill(ByteBuffer buffer) throws IOException
+ public int fill(Buffer buffer) throws IOException
{
return 0;
}
@Override
- public IOFuture readable() throws IllegalStateException
+ public int flush(Buffer buffer) throws IOException
{
- return null;
+ return 0;
}
@Override
- public int flush(ByteBuffer... buffer) throws IOException
+ public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
{
return 0;
}
@Override
- public IOFuture write(ByteBuffer... buffers) throws IllegalStateException
+ public String getLocalAddr()
{
return null;
}
@Override
- public InetSocketAddress getLocalAddress()
+ public String getLocalHost()
{
return null;
}
@Override
- public InetSocketAddress getRemoteAddress()
+ public int getLocalPort()
+ {
+ return -1;
+ }
+
+ @Override
+ public String getRemoteAddr()
{
return null;
}
@Override
+ public String getRemoteHost()
+ {
+ return null;
+ }
+
+ @Override
+ public int getRemotePort()
+ {
+ return -1;
+ }
+
+ @Override
+ public boolean isBlocking()
+ {
+ return false;
+ }
+
+ @Override
+ public boolean blockReadable(long millisecs) throws IOException
+ {
+ return false;
+ }
+
+ @Override
+ public boolean blockWritable(long millisecs) throws IOException
+ {
+ return false;
+ }
+
+ @Override
public boolean isOpen()
{
return !closed;
@@ -141,6 +211,11 @@ public class EmptyAsyncEndPoint implements AsyncEndPoint
}
@Override
+ public void flush() throws IOException
+ {
+ }
+
+ @Override
public int getMaxIdleTime()
{
return maxIdleTime;

Back to the top