Class Task

  • Direct Known Subclasses:
    Adapter, Callback, Callback2

    public abstract class Task
    extends java.lang.Object
    Simple base task which contains logic for routing calls reflectively to ice_response and ice_exception of any AMD callback.
    Since:
    Beta4
    • Field Detail

      • cb

        protected final java.lang.Object cb
      • isVoid

        protected final boolean isVoid
      • response

        protected final java.lang.reflect.Method response
      • exception

        protected final java.lang.reflect.Method exception
    • Constructor Detail

      • Task

        public Task​(java.lang.Object callback,
                    Ice.Current current,
                    boolean isVoid)
    • Method Detail

      • response

        protected void response​(java.lang.Object rv,
                                ome.system.OmeroContext ctx)
        Calls the response method
      • postProcess

        protected java.lang.Object postProcess​(java.lang.Object rv)
                                        throws ServerError
        Can be overridden to transform the return value from the async method. This implementation leaves the return value unchanged.
        Parameters:
        rv - a return value
        Returns:
        the return value transformed
        Throws:
        ServerError - if the transformation failed
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object