Class EndpointEvent

java.lang.Object
com.jme3.network.kernel.EndpointEvent

public class EndpointEvent extends Object
Provides information about an added or removed connection.
Author:
Paul Speed
  • Constructor Details

    • EndpointEvent

      public EndpointEvent(Kernel source, Endpoint p, EndpointEvent.Type type)
      Creates an endpoint event.
      Parameters:
      source - the kernel that produced the event
      p - the endpoint involved in the event
      type - the event type
  • Method Details

    • createAdd

      public static EndpointEvent createAdd(Kernel source, Endpoint p)
      Creates an endpoint-added event.
      Parameters:
      source - the kernel that produced the event
      p - the added endpoint
      Returns:
      the created event
    • createRemove

      public static EndpointEvent createRemove(Kernel source, Endpoint p)
      Creates an endpoint-removed event.
      Parameters:
      source - the kernel that produced the event
      p - the removed endpoint
      Returns:
      the created event
    • getSource

      public Kernel getSource()
      Returns the kernel that produced the event.
      Returns:
      the source kernel
    • getEndpoint

      public Endpoint getEndpoint()
      Returns the endpoint involved in the event.
      Returns:
      the event endpoint
    • getType

      public EndpointEvent.Type getType()
      Returns the event type.
      Returns:
      the event type
    • toString

      public String toString()
      Overrides:
      toString in class Object