Created
August 21, 2020 14:05
-
-
Save nsivabalan/0737fb99d34805854752e10c9bbce6b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generic interface to represent MethodInfo fo type <T>. Used to hold method info like url path, | |
* call type etc. | |
* | |
* @param <T> | |
*/ | |
public interface MethodInfo<T> { | |
/** @return the methodInfo object as is. */ | |
T getTransportMethodInfo(); | |
/** @return the urlpath/endpoint of the request. */ | |
@Nullable | |
String getUrlPath(); | |
/** @return the servicename. Applicable for grpc transport. */ | |
@Nullable | |
String getServiceName(); | |
/** @return {@code true} if the method represents a unary calls. {@code false} otherwise. */ | |
boolean isUnary(); | |
/** @return the {@link MethodType} of the request. */ | |
MethodType getMethodType(); | |
/** @return {@code true} if the method is idempotent. {@link false} otherwise. */ | |
boolean isIdempotent(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment