Example #1
0
    def end_handler(self, handler):
        """Set an end handler on the stream. Once the stream has ended, and there is no more data to be read, this handler will be called.

        Keyword arguments:
        @param handler: The exception handler"""
        self.java_obj.endHandler(NullDoneHandler(handler))
        return self
Example #2
0
def run_on_context(handler):
    """Put the handler on the event queue for this loop so it will be run asynchronously
    ASAP after this event has been processed

    Keyword arguments:
    @param handler: an handler representing the code that will be run ASAP
    """
    java_vertx().runOnContext(NullDoneHandler(handler))
Example #3
0
    def ssl(self, handler):
        """Upgrades the channel to use SSL/TLS. Be aware for this to work SSL must be configured.

        Keyword arguments:
        @param handler: a function to be called once complete
        @return: self
        """
        self.java_obj.ssl(NullDoneHandler(handler))
        return self
Example #4
0
    def drain_handler(self, handler):
        """Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write
        queue has been reduced to maxSize / 2. See  for an example of this being used.

        Keyword arguments:
        @param handler: The drain handler
        """
        self.java_obj.drainHandler(NullDoneHandler(handler))
        return self
Example #5
0
 def run_on_context(self, handler):
     self.j_context.runOnContext(NullDoneHandler(handler))