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.java173
1 files changed, 45 insertions, 128 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 58dbc8a9aa..a204867c2d 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,103 +1,59 @@
-//========================================================================
-//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.
-//========================================================================
-
+/*
+ * 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.
+ */
package org.eclipse.jetty.spdy;
import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.ReadPendingException;
+import java.nio.channels.WritePendingException;
+import org.eclipse.jetty.io.AsyncConnection;
import org.eclipse.jetty.io.AsyncEndPoint;
-import org.eclipse.jetty.io.Buffer;
-import org.eclipse.jetty.io.Connection;
-import org.eclipse.jetty.util.thread.Timeout;
+import org.eclipse.jetty.util.Callback;
public class EmptyAsyncEndPoint implements AsyncEndPoint
{
private boolean checkForIdle;
- private Connection connection;
+ private AsyncConnection connection;
private boolean oshut;
- private boolean ishut;
private boolean closed;
- private int maxIdleTime;
-
- @Override
- public void dispatch()
- {
- }
-
- @Override
- public void asyncDispatch()
- {
- }
-
- @Override
- public void scheduleWrite()
- {
- }
-
- @Override
- public void onIdleExpired(long idleForMs)
- {
- }
-
- @Override
- public void setCheckForIdle(boolean check)
- {
- this.checkForIdle = check;
- }
+ private long maxIdleTime;
@Override
- public boolean isCheckForIdle()
- {
- return checkForIdle;
- }
-
- @Override
- 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)
+ public long getCreatedTimeStamp()
{
+ return 0;
}
@Override
- public Connection getConnection()
+ public AsyncConnection getAsyncConnection()
{
return connection;
}
@Override
- public void setConnection(Connection connection)
+ public void setAsyncConnection(AsyncConnection connection)
{
this.connection = connection;
}
@Override
- public void shutdownOutput() throws IOException
+ public void shutdownOutput()
{
oshut = true;
}
@@ -109,121 +65,82 @@ public class EmptyAsyncEndPoint implements AsyncEndPoint
}
@Override
- public void shutdownInput() throws IOException
- {
- ishut = true;
- }
-
- @Override
public boolean isInputShutdown()
{
- return ishut;
+ return false;
}
@Override
- public void close() throws IOException
+ public void close()
{
closed = true;
}
@Override
- public int fill(Buffer buffer) throws IOException
- {
- return 0;
- }
-
- @Override
- public int flush(Buffer buffer) throws IOException
+ public int fill(ByteBuffer buffer) throws IOException
{
return 0;
}
@Override
- public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
+ public int flush(ByteBuffer... buffer) throws IOException
{
return 0;
}
@Override
- public String getLocalAddr()
+ public InetSocketAddress getLocalAddress()
{
return null;
}
@Override
- public String getLocalHost()
+ public InetSocketAddress getRemoteAddress()
{
return null;
}
@Override
- public int getLocalPort()
- {
- return -1;
- }
-
- @Override
- public String getRemoteAddr()
+ public boolean isOpen()
{
- return null;
+ return !closed;
}
@Override
- public String getRemoteHost()
+ public Object getTransport()
{
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
+ public long getIdleTimeout()
{
- return false;
+ return maxIdleTime;
}
@Override
- public boolean isOpen()
+ public void setIdleTimeout(long timeMs)
{
- return !closed;
+ this.maxIdleTime = timeMs;
}
@Override
- public Object getTransport()
+ public void onOpen()
{
- return null;
}
@Override
- public void flush() throws IOException
+ public void onClose()
{
}
@Override
- public int getMaxIdleTime()
+ public <C> void fillInterested(C context, Callback<C> callback) throws ReadPendingException
{
- return maxIdleTime;
}
@Override
- public void setMaxIdleTime(int timeMs) throws IOException
+ public <C> void write(C context, Callback<C> callback, ByteBuffer... buffers) throws WritePendingException
{
- this.maxIdleTime = timeMs;
}
}

Back to the top