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