Package com.c8db.internal.velocystream
Class VstCommunication<R,C extends VstConnection>
- java.lang.Object
-
- com.c8db.internal.velocystream.VstCommunication<R,C>
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
VstCommunicationSync
public abstract class VstCommunication<R,C extends VstConnection> extends Object implements Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected Integerchunksizeprotected static StringENCRYPTION_PLAINprotected static AtomicLongmIdprotected Stringpasswordprotected Stringuserprotected C8Serializationutil
-
Constructor Summary
Constructors Modifier Constructor Description protectedVstCommunication(Integer timeout, String user, String password, Boolean useSsl, SSLContext sslContext, C8Serialization util, Integer chunksize, HostHandler hostHandler)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidauthenticate(C connection)protected Collection<Chunk>buildChunks(Message message)protected voidcheckError(Response response)voidclose()protected Cconnect(HostHandle hostHandle, AccessType accessType)protected MessagecreateMessage(Request request)protected ResponsecreateResponse(Message message)protected abstract Rexecute(Request request, C connection)Rexecute(Request request, HostHandle hostHandle)
-
-
-
Field Detail
-
ENCRYPTION_PLAIN
protected static final String ENCRYPTION_PLAIN
- See Also:
- Constant Field Values
-
mId
protected static final AtomicLong mId
-
util
protected final C8Serialization util
-
user
protected final String user
-
password
protected final String password
-
chunksize
protected final Integer chunksize
-
-
Constructor Detail
-
VstCommunication
protected VstCommunication(Integer timeout, String user, String password, Boolean useSsl, SSLContext sslContext, C8Serialization util, Integer chunksize, HostHandler hostHandler)
-
-
Method Detail
-
connect
protected C connect(HostHandle hostHandle, AccessType accessType)
-
authenticate
protected abstract void authenticate(C connection)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
execute
public R execute(Request request, HostHandle hostHandle) throws C8DBException
- Throws:
C8DBException
-
execute
protected abstract R execute(Request request, C connection) throws C8DBException
- Throws:
C8DBException
-
checkError
protected void checkError(Response response) throws C8DBException
- Throws:
C8DBException
-
createResponse
protected Response createResponse(Message message) throws com.arangodb.velocypack.exception.VPackParserException
- Throws:
com.arangodb.velocypack.exception.VPackParserException
-
createMessage
protected Message createMessage(Request request) throws com.arangodb.velocypack.exception.VPackParserException
- Throws:
com.arangodb.velocypack.exception.VPackParserException
-
buildChunks
protected Collection<Chunk> buildChunks(Message message)
-
-