public class TapServiceKit extends 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(TapService service,
             String ivoid,
             TapMetaPolicy metaPolicy,
             ContentCoding coding,
             int queueLimit)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
acquireAuthStatus(ResultHandler<AuthStatus> handler,
                 boolean forceLogin)
Asynchronously attempts to contact the authcheck endpoint of the
 TAP service to determine authentication information. 
 | 
void | 
acquireCapability(ResultHandler<TapCapability> handler)
Asynchronously acquires TAP capability information. 
 | 
void | 
acquireExamples(ResultHandler<List<Tree<DaliExample>>> handler)
Asynchronously acquires a list of service-specific query examples,
 if available. 
 | 
void | 
acquireResource(ResultHandler<Map<String,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. 
 | 
String | 
getIvoid()
Returns the resource identifier for this kit if known. 
 | 
TapMetaReader | 
getMetaReader()
Returns the TapMetaReader in use by this kit. 
 | 
TapService | 
getRegTapService()
Returns a RegTAP service that can be queried
 for information about this service's registry record. 
 | 
TapService | 
getTapService()
Returns the TAP service used by this kit. 
 | 
boolean | 
onColumns(TableMeta tmeta,
         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,
             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,
        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(TapService service, String ivoid, TapMetaPolicy metaPolicy, ContentCoding coding, int queueLimit)
service - TAP service descriptionivoid - 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 TapService getTapService()
public String getIvoid()
public boolean onTables(SchemaMeta smeta, 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, 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, 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<Map<String,String>> handler)
handler - receiver for resource metadata mappublic void acquireRoles(ResultHandler<RegRole[]> handler)
handler - receiver for role listpublic void acquireExamples(ResultHandler<List<Tree<DaliExample>>> handler)
handler - receiver for example listpublic void acquireAuthStatus(ResultHandler<AuthStatus> handler, boolean forceLogin)
On completion, the supplied handler is messaged with either the authentication status (which may represent anonymous usage) meaning that subsequent interactions with this service via the AuthManager may be successful, or with an IOException, meaning that authorization was denied and further interaction with the service is likely to fail.
handler - receives authentication information;
                  either an authentication status
                  or an authentication errorforceLogin - if true, the user will be asked to (re-)login if
                     authentication is available; otherwise
                     existing or anonymous interaction is preferredpublic TapService getRegTapService()
The default implementation returns the default value from
 TapServices.getRegTapService().
public void shutdown()
public TapMetaReader getMetaReader()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.