All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.linkedin.restli.common.ResourceSpec Maven / Gradle / Ivy

Go to download

Pegasus is a framework for building robust, scalable service architectures using dynamic discovery and simple asychronous type-checked REST + JSON APIs.

There is a newer version: 27.7.18
Show newest version
/*
   Copyright (c) 2012 LinkedIn Corp.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package com.linkedin.restli.common;


import com.linkedin.data.template.DynamicRecordMetadata;
import com.linkedin.data.template.RecordTemplate;
import java.util.Map;


/**
 * Runtime representation of resource spec.
 *
 * @author Eran Leshem
 */
public interface ResourceSpec extends ResourceProperties
{
  /**
   * @return the class of the key
   */
  Class getKeyClass();

  /**
   * @return the RecordTemplate that the Resource Manages
   */
  Class getValueClass();

  /**
   * @return the map of key names to key classes, if the keyClass is a CompoundKey
   */
  Map getKeyParts();

  /**
   * @return the key of the key, if the keyClass is a ComplexResourceKey
   */
  Class getKeyKeyClass();

  /**
   * @return the parameters of the key, if the keyClass is a ComplexResourceKey
   */
  Class getKeyParamsClass();

  /**
   * @param methodName the name of the method
   * @return the {@link DynamicRecordMetadata} of the method
   */
  public DynamicRecordMetadata getRequestMetadata(String methodName);

  /**
   * @param methodName the name of the method
   * @return the {@link DynamicRecordMetadata} of the Response
   */
  public DynamicRecordMetadata getActionResponseMetadata(String methodName);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy