public class TapServiceKit
extends java.lang.Object
This class is intended for use with Swing; some methods must be invoked from the Event Dispatch Thread as documented.
Constructor and Description |
---|
TapServiceKit(EndpointSet endpointSet,
java.lang.String ivoid,
TapMetaPolicy metaPolicy,
uk.ac.starlink.util.ContentCoding coding,
int queueLimit)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acquireCapability(ResultHandler<TapCapability> handler)
Asynchronously acquires TAP capability information.
|
void |
acquireExamples(ResultHandler<DaliExample[]> handler)
Asynchronously acquires a list of service-specific query examples,
if available.
|
void |
acquireResource(ResultHandler<java.util.Map<java.lang.String,java.lang.String>> handler)
Asynchronously acquires information about the registry resource
corresponding to this service.
|
void |
acquireRoles(ResultHandler<RegRole[]> handler)
Asynchronously acquires information from the RegTAP rr.res_role table
corresponding to this service.
|
void |
acquireSchemas(ResultHandler<SchemaMeta[]> handler)
Asynchronously acquires TAP database schema list.
|
EndpointSet |
getEndpointSet()
Returns the endpoint set used by this kit.
|
java.lang.String |
getIvoid()
Returns the resource identifier for this kit if known.
|
TapMetaReader |
getMetaReader()
Returns the TapMetaReader in use by this kit.
|
EndpointSet |
getRegTapEndpointSet()
Returns the URL at which a RegTAP service lives that can be queried
for information about this service's registry record.
|
boolean |
onColumns(TableMeta tmeta,
java.lang.Runnable callback)
Invokes a runnable on the Event Dispatch Thread when the
column metadata is available for a given table metadata object.
|
boolean |
onForeignKeys(TableMeta tmeta,
java.lang.Runnable callback)
Invokes a runnable on the Event Dispatch Thread when the
foreign key metadata is available for a given table metadata object.
|
boolean |
onTables(SchemaMeta smeta,
java.lang.Runnable callback)
Invokes a runnable on the Event Dispatch Thread when the
table metadata is available for a given schema metadata object.
|
void |
shutdown()
Releases resources and terminates any currently running asynchronous
metadata reads.
|
public TapServiceKit(EndpointSet endpointSet, java.lang.String ivoid, TapMetaPolicy metaPolicy, uk.ac.starlink.util.ContentCoding coding, int queueLimit)
endpointSet
- service location setivoid
- IVORN of TAP service, if known (may be null)metaPolicy
- implementation for reading table metadatacoding
- configures HTTP compressionqueueLimit
- maximum number of table metadata requests queued
to service; more than that and older ones
will be droppedpublic EndpointSet getEndpointSet()
public java.lang.String getIvoid()
public boolean onTables(SchemaMeta smeta, java.lang.Runnable callback)
smeta
- schema metadata itemcallback
- runnable to be invoked on the EDT when
smeta.getTables() has a non-null returnpublic boolean onColumns(TableMeta tmeta, java.lang.Runnable callback)
tmeta
- table metadata itemcallback
- runnable to be invoked on the EDT when
tmeta.getColumns() has a non-null returnpublic boolean onForeignKeys(TableMeta tmeta, java.lang.Runnable callback)
tmeta
- table metadata itemcallback
- runnable to be invoked on the EDT when
tmeta.getForeignKeys() has a non-null returnpublic void acquireSchemas(ResultHandler<SchemaMeta[]> handler)
handler
- receiver for schema informationpublic void acquireCapability(ResultHandler<TapCapability> handler)
handler
- receiver for TAP capability objectpublic void acquireResource(ResultHandler<java.util.Map<java.lang.String,java.lang.String>> handler)
handler
- receiver for resource metadata mappublic void acquireRoles(ResultHandler<RegRole[]> handler)
handler
- receiver for role listpublic void acquireExamples(ResultHandler<DaliExample[]> handler)
handler
- receiver for example listpublic EndpointSet getRegTapEndpointSet()
The default implementation returns the default value from
Endpoints.getRegTapEndpointSet()
.
public void shutdown()
public TapMetaReader getMetaReader()
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.