public interface Connector extends Closeable
Modifier and Type | Field and Description |
---|---|
static String |
PLUGIN_TYPE |
Modifier and Type | Method and Description |
---|---|
BrowseDetail |
browse(ConnectorContext context,
BrowseRequest request)
Browse the resources on the given request.
|
default void |
close() |
default void |
configure(ConnectorConfigurer configurer)
Configure this connector, for example, the database connector will need to load the jdbc driver.
|
ConnectorSpec |
generateSpec(ConnectorContext context,
ConnectorSpecRequest path)
Generate spec based on the given path, the spec should contain all the properties associated with the path.
|
void |
test(ConnectorContext context)
Test if the connector is able to connect to the resource
|
static final String PLUGIN_TYPE
default void configure(ConnectorConfigurer configurer) throws IOException
IOException
void test(ConnectorContext context) throws ValidationException
context
- context for the connectorValidationException
- if the connector is not able to connect to the sourceBrowseDetail browse(ConnectorContext context, BrowseRequest request) throws IOException
context
- context for the connectorrequest
- the browse requestIOException
ConnectorSpec generateSpec(ConnectorContext context, ConnectorSpecRequest path) throws IOException
context
- context for the connectorpath
- the path of the entityIOException
default void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2021 Cask Data, Inc. Licensed under the Apache License, Version 2.0.