Interface HttpEntityConnection
- All Superinterfaces:
AutoCloseable,EntityConnection
EntityConnection instances.
Limitations: iterator(Condition) and iterator(Select) are not
supported on http connections; they throw UnsupportedOperationException.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds a self-managing http basedEntityConnection.Nested classes/interfaces inherited from interface is.codion.framework.db.EntityConnection
EntityConnection.BatchCopy, EntityConnection.BatchInsert, EntityConnection.Count, EntityConnection.QueryCache, EntityConnection.Select, EntityConnection.Transactional, EntityConnection.TransactionalResult<T>, EntityConnection.Update -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<Integer> The connect timeout in milliseconds, that is, how long establishing the connection may take.static final PropertyValue<String> The host on which to locate the http server Value type: String Default value: localhoststatic final PropertyValue<Boolean> Specifies whether json serialization should be used instead of standard Java serialization.static final PropertyValue<Integer> The port which the http client should use.static final PropertyValue<Boolean> Specifies whether https should be used Value type: Boolean Default value: truestatic final PropertyValue<Integer> The port which the https client should use Value type: Integer Default value: 4443static final PropertyValue<Integer> The socket timeout in milliseconds, that is, how long an operation may wait for the server's response.Fields inherited from interface is.codion.framework.db.EntityConnection
CLIENT_CONNECTION_TYPE, CONNECTION_TYPE_HTTP, CONNECTION_TYPE_LOCAL, CONNECTION_TYPE_REMOTE, DESCRIPTION, MAXIMUM_BATCH_SIZE, VALIDITY_CHECK_INTERVAL -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic HttpEntityConnection.Builderbuilder()Instantiates a builder for a self-managingHttpEntityConnection, one which connects on demand and reconnects when the underlying connection has gone bad, serving for the lifetime of a client.Methods inherited from interface is.codion.framework.db.EntityConnection
cacheQueries, clientId, clientVersion, close, commitTransaction, connected, count, count, delete, delete, delete, dependencies, description, entities, execute, execute, execute, execute, insert, insert, insertSelect, insertSelect, iterator, iterator, iterator, report, rollbackTransaction, select, select, select, select, select, select, select, select, select, selectSingle, selectSingle, selectSingle, startTransaction, transactionOpen, update, update, update, update, updateSelect, updateSelect, user
-
Field Details
-
HOSTNAME
The host on which to locate the http server- Value type: String
- Default value: localhost
-
PORT
The port which the http client should use.- Value type: Integer
- Default value: 8080
-
SECURE_PORT
The port which the https client should use- Value type: Integer
- Default value: 4443
-
SECURE
Specifies whether https should be used- Value type: Boolean
- Default value: true
-
JSON
Specifies whether json serialization should be used instead of standard Java serialization.- Value type: Boolean
- Default value: true
-
SOCKET_TIMEOUT
The socket timeout in milliseconds, that is, how long an operation may wait for the server's response.
Zero (the default) means no timeout, matching the RMI transport, which does not impose one either. A finite value caps every operation, so it must exceed the slowest one the application performs - a report, a bulk update or a domain function may run far longer than a select.
- Value type: Integer
- Default value: 0 ms (no timeout)
-
CONNECT_TIMEOUT
The connect timeout in milliseconds, that is, how long establishing the connection may take. Bounded work, unlike
SOCKET_TIMEOUT, so this one has a finite default - a misconfigured hostname or port should fail promptly rather than hang.Zero means no timeout.
- Value type: Integer
- Default value: 10000 ms
-
-
Method Details
-
builder
Instantiates a builder for a self-managing
HttpEntityConnection, one which connects on demand and reconnects when the underlying connection has gone bad, serving for the lifetime of a client.- Returns:
- a new builder instance
- See Also:
-