
com.marklogic.client.extensions.ResourceManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-client-api Show documentation
Show all versions of marklogic-client-api Show documentation
The official MarkLogic Java client API.
The newest version!
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.extensions;
import com.marklogic.client.util.RequestLogger;
import com.marklogic.client.impl.ResourceManagerImplementation;
/**
* ResourceManager is the base class for a client interface
* to resource services. Resource Service extensions can be
* installed on the server using {@link com.marklogic.client.admin.ResourceExtensionsManager}.
* Initialize a ResourceManager object by passing it to the
* {@link com.marklogic.client.DatabaseClient}.init() method.
*
* To expose the services provided by a resource service extension to
* applications, implement a subclass of ResourceManager. In your subclass, use
* the methods of a {@link ResourceServices} object to call the Resource Services
* on the server.
*
* Obtain a {@link ResourceServices} object by calling the protected
* getServices
method of the ResourceManager. This method
* has the following signature:
*
* {@link ResourceServices} getServices()
*/
abstract public class ResourceManager
extends ResourceManagerImplementation
{
protected ResourceManager() {
super();
}
/**
* Returns the name of the resource.
* @return the name of the resource
*/
public String getName() {
ResourceServices services = getServices();
return (services != null) ? services.getResourceName() : null;
}
/**
* Starts debugging client requests. You can suspend and resume debugging output
* using the methods of the logger.
*
* @param logger the logger that receives debugging output
*/
public void startLogging(RequestLogger logger) {
ResourceServices services = getServices();
if (services != null)
services.startLogging(logger);
}
/**
* Stops debugging client requests.
*/
public void stopLogging() {
ResourceServices services = getServices();
if (services != null)
services.stopLogging();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy