Server { public void addTerseExceptions(Class<?>... exceptionClass) { exceptionsHandler.addTerseExceptions(exceptionClass); } protected  Server(String bindAddress, int port,
                  Class<? extends Writable> paramClass, int handlerCount, 
                  Configuration conf); protected  Server(String bindAddress, int port,
      Class<? extends Writable> rpcRequestClass, int handlerCount,
      int numReaders, int queueSizePerHandler, Configuration conf,
      String serverName, SecretManager<? extends TokenIdentifier> secretManager); @SuppressWarnings("unchecked") protected  Server(String bindAddress, int port,
      Class<? extends Writable> rpcRequestClass, int handlerCount,
      int numReaders, int queueSizePerHandler, Configuration conf,
      String serverName, SecretManager<? extends TokenIdentifier> secretManager,
      String portRangeConfig); void addTerseExceptions(Class<?>... exceptionClass); static void registerProtocolEngine(RPC.RpcKind rpcKind, 
          Class<? extends Writable> rpcRequestWrapperClass,
          RpcInvoker rpcInvoker); Class<? extends Writable> getRpcRequestWrapper(
      RpcKindProto rpcKind); static RpcInvoker getRpcInvoker(RPC.RpcKind rpcKind); static Server get(); @VisibleForTesting static ThreadLocal<Call> getCurCall(); static int getCallId(); static int getCallRetryCount(); static InetAddress getRemoteIp(); static byte[] getClientId(); static String getRemoteAddress(); static UserGroupInformation getRemoteUser(); static boolean isRpcInvocation(); static void bind(ServerSocket socket, InetSocketAddress address, 
                          int backlog); static void bind(ServerSocket socket, InetSocketAddress address, 
      int backlog, Configuration conf, String rangeConf); @VisibleForTesting RpcMetrics getRpcMetrics(); @VisibleForTesting RpcDetailedMetrics getRpcDetailedMetrics(); void refreshServiceAcl(Configuration conf, PolicyProvider provider); @Private void refreshServiceAclWithLoadedConfiguration(Configuration conf,
      PolicyProvider provider); @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"}) ServiceAuthorizationManager getServiceAuthorizationManager(); synchronized void refreshCallQueue(Configuration conf); void setSocketSendBufSize(int size); void setTracer(Tracer t); synchronized void start(); synchronized void stop(); synchronized void join(); synchronized InetSocketAddress getListenerAddress(); @Deprecated Writable call(Writable param, long receiveTime); abstract Writable call(RPC.RpcKind rpcKind, String protocol,
      Writable param, long receiveTime); int getPort(); int getNumOpenConnections(); int getCallQueueLen(); int getMaxQueueSize(); int getNumReaders(); static final Log LOG; static final Log AUDITLOG; }
@Test public void testExceptionsHandler() { Server.ExceptionsHandler handler = new Server.ExceptionsHandler(); handler.addTerseExceptions(IOException.class); handler.addTerseExceptions(RpcServerException.class, IpcException.class); assertTrue(handler.isTerse(IOException.class)); assertTrue(handler.isTerse(RpcServerException.class)); assertTrue(handler.isTerse(IpcException.class)); assertFalse(handler.isTerse(RpcClientException.class)); }