Class ResourceServiceAdapter

java.lang.Object
org.apache.uima.resource.Resource_ImplBase
org.apache.uima.resource.service.impl.ResourceServiceAdapter
All Implemented Interfaces:
Resource

public abstract class ResourceServiceAdapter extends Resource_ImplBase
Insulates applications from the knowledge that they are interacting with a ResourceService_impl rather than a local instance of a Resource. This is an abstract base class that specific resource adapter implementations may extend.

This class implements the Resource interface and encapsulates all communications with a remote ResourceService. Thus, applications can interact with this adapter in the same way they would interact with any Resource, and can be completely unaware of the fact that a remote ResourceService is being used.

  • Constructor Details

    • ResourceServiceAdapter

      public ResourceServiceAdapter()
  • Method Details

    • setStub

      protected void setStub(ResourceServiceStub aStub)
      Sets the stub to be used to communicate with the remote service. Subclasses must call this from their initialize method.
      Parameters:
      aStub - the stub for the remote service
    • getStub

      protected ResourceServiceStub getStub()
      Gets the stub to be used to communicate with the remote service.
      Returns:
      the stub for the remote service
    • getMetaData

      public ResourceMetaData getMetaData()
      Description copied from interface: Resource
      Gets the metadata that describes this Resource.
      Specified by:
      getMetaData in interface Resource
      Overrides:
      getMetaData in class Resource_ImplBase
      Returns:
      an object containing all metadata for this resource.