Class DryRunGatewayConnection
- java.lang.Object
-
- com.yahoo.vespa.http.client.core.communication.DryRunGatewayConnection
-
- All Implemented Interfaces:
GatewayConnection
public class DryRunGatewayConnection extends Object implements GatewayConnection
Dummy implementation.- Author:
- dybis
-
-
Constructor Summary
Constructors Constructor Description DryRunGatewayConnection(Endpoint endpoint, Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
connect()
Instant
connectionTime()
Returns the time this connected over the network, or null if not connected yetInputStream
drain()
Attempt to drain all outstanding operations, even if this leads to blockingEndpoint
getEndpoint()
void
handshake()
List<Document>
held()
Returns the document currently held in thisvoid
hold(boolean hold)
Instant
lastPollTime()
Returns the last time poll was called on this, or null if neverInputStream
poll()
Returns any operation results that are ready nowvoid
throwOnHandshake(ServerResponseException throwThisOnHandshake)
void
throwOnWrite(IOException throwThisOnWrite)
InputStream
write(List<Document> docs)
-
-
-
Method Detail
-
write
public InputStream write(List<Document> docs) throws IOException
- Specified by:
write
in interfaceGatewayConnection
- Throws:
IOException
-
poll
public InputStream poll() throws IOException
Description copied from interface:GatewayConnection
Returns any operation results that are ready now- Specified by:
poll
in interfaceGatewayConnection
- Throws:
IOException
-
lastPollTime
public Instant lastPollTime()
Description copied from interface:GatewayConnection
Returns the last time poll was called on this, or null if never- Specified by:
lastPollTime
in interfaceGatewayConnection
-
drain
public InputStream drain() throws IOException
Description copied from interface:GatewayConnection
Attempt to drain all outstanding operations, even if this leads to blocking- Specified by:
drain
in interfaceGatewayConnection
- Throws:
IOException
-
connect
public boolean connect()
- Specified by:
connect
in interfaceGatewayConnection
-
connectionTime
public Instant connectionTime()
Description copied from interface:GatewayConnection
Returns the time this connected over the network, or null if not connected yet- Specified by:
connectionTime
in interfaceGatewayConnection
-
getEndpoint
public Endpoint getEndpoint()
- Specified by:
getEndpoint
in interfaceGatewayConnection
-
handshake
public void handshake() throws ServerResponseException
- Specified by:
handshake
in interfaceGatewayConnection
- Throws:
ServerResponseException
-
close
public void close()
- Specified by:
close
in interfaceGatewayConnection
-
hold
public void hold(boolean hold)
-
throwOnWrite
public void throwOnWrite(IOException throwThisOnWrite)
-
throwOnHandshake
public void throwOnHandshake(ServerResponseException throwThisOnHandshake)
-
-