Package org.apache.hadoop.ipc
Class ProtocolProxy<T>
java.lang.Object
org.apache.hadoop.ipc.ProtocolProxy<T>
a class wraps around a server's proxy,
containing a list of its supported methods.
A list of methods with a value of null indicates that the client and server
have the same protocol.
-
Constructor Summary
ConstructorsConstructorDescriptionProtocolProxy(Class<T> protocol, T proxy, boolean supportServerMethodCheck) Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetProxy()booleanisMethodSupported(String methodName, Class<?>... parameterTypes) Check if a method is supported by the server or not.
-
Constructor Details
-
ProtocolProxy
Constructor- Parameters:
protocol- protocol classproxy- its proxysupportServerMethodCheck- If false proxy will never fetch server methods and isMethodSupported will always return true. If true, server methods will be fetched for the first call to isMethodSupported.
-
-
Method Details
-
getProxy
-
isMethodSupported
Check if a method is supported by the server or not.- Parameters:
methodName- a method's name in String formatparameterTypes- a method's parameter types- Returns:
- true if the method is supported by the server
- Throws:
IOException- raised on errors performing I/O.
-