Class AbstractKernel

java.lang.Object
com.jme3.network.kernel.AbstractKernel
All Implemented Interfaces:
Kernel
Direct Known Subclasses:
SelectorKernel, UdpKernel

public abstract class AbstractKernel extends Object implements Kernel
Base implementation of the Kernel interface providing several useful default implementations of some methods. This implementation assumes that the kernel will be managing its own internal threads and queuing any results for the caller to retrieve on their own thread.
  • Constructor Details Link icon

    • AbstractKernel Link icon

      protected AbstractKernel()
  • Method Details Link icon

    • reportError Link icon

      protected void reportError(Exception e)
    • wakeupReader Link icon

      protected void wakeupReader()
    • nextEndpointId Link icon

      protected long nextEndpointId()
    • hasEnvelopes Link icon

      public boolean hasEnvelopes()
      Returns true if there are waiting envelopes.
      Specified by:
      hasEnvelopes in interface Kernel
    • read Link icon

      public Envelope read() throws InterruptedException
      Removes one envelope from the received messages queue or blocks until one is available.
      Specified by:
      read in interface Kernel
      Throws:
      InterruptedException
    • nextEvent Link icon

      public EndpointEvent nextEvent()
      Removes and returns one endpoint event from the event queue or null if there are no endpoint events.
      Specified by:
      nextEvent in interface Kernel
    • addEvent Link icon

      protected void addEvent(EndpointEvent e)
    • addEnvelope Link icon

      protected void addEnvelope(Envelope env)