AdbaSessionProperty
, Examples.ExampleSessionProperty
public interface SessionProperty
Session
that can be configured to influence its
behavior. Implementors of this interface define the properties of
Session
s. The Session.Builder.property(jdk.incubator.sql2.SessionProperty, java.lang.Object)
method is used to set the values
of Session
properties.
Implementations must be thread safe.Modifier and Type | Method | Description |
---|---|---|
default boolean |
configureOperation(OperationGroup<?,?> group,
java.lang.Object value) |
|
java.lang.Object |
defaultValue() |
Return the value for this property to use if no other value is set.
|
boolean |
isSensitive() |
Returns true if this
SessionProperty contains sensitive information
such as a password or encryption key. |
java.lang.String |
name() |
Return the name of this
SessionProperty . |
java.lang.Class<?> |
range() |
Return the type of the value of this
SessionProperty . |
default boolean |
validate(java.lang.Object value) |
Determine whether a value is valid for this
SessionProperty . |
java.lang.String name()
SessionProperty
.SessionProperty
java.lang.Class<?> range()
SessionProperty
. Any value
set for this property must be assignable to this type.SessionProperty
default boolean validate(java.lang.Object value)
SessionProperty
. Returns
true
if value
is valid and false
otherwise.value
- a value for this SessionProperty
true
iff value
is valid for this SessionProperty
java.lang.Object defaultValue()
DataSource
by calling
DataSource.Builder.registerSessionProperty(jdk.incubator.sql2.SessionProperty)
.null
if there is no default valueboolean isSensitive()
SessionProperty
contains sensitive information
such as a password or encryption key.default boolean configureOperation(OperationGroup<?,?> group, java.lang.Object value)
Operation
s that will configure the
Session
to have the specified property value. Returns true
if any Operation
s were submitted. false
otherwise.
Called by Session.Builder.build()
to configure a Session
as
specified in the Session.Builder.property(jdk.incubator.sql2.SessionProperty, java.lang.Object)
method. SessionProperties
known to the implementation may return false
and rely on the
implementation to do the right thing.group
- an OperationGroup
which will be the container of the
submitted Operation
s, if anyvalue
- the value to which the property is to be set. May be null if
range()
is Void
.Operation
s were submitted, false otherwisejava.lang.IllegalStateException
- if it is not possible to configure the
Session
as specified.java.lang.IllegalArgumentException
- if this.validate(value)
returns
false
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
DRAFT JDBC 4.4 EA5