code: public void unsubscribe(final Subscription<T> subscription) {
      final T token = subscription.getToken();
      LOG.log(Level.FINER, "RemoteManager: {0} token {1}", new Object[]{this.name, token});
      if (token instanceof Exception) {
        this.transport.registerErrorHandler(null);
      } else if (token instanceof Tuple2) {
        this.tupleToHandlerMap.remove(token);
      } else if (token instanceof Class) {
        this.msgTypeToHandlerMap.remove(token);
      } else {
        throw new RemoteRuntimeException(
            "Unknown subscription type: " + subscription.getClass().getCanonicalName());
      }
    }
docs: Unsubscribes a handler.
  
  @param subscription
  @throws org.apache.reef.wake.remote.exception.RemoteRuntimeException if the Subscription type is unknown.
  @deprecated [REEF-1544] Prefer using SubscriptionHandler and the corresponding methods
  instead of the old Subscription class. Remove method after release 0.16.