Klasse Resource<M>

java.lang.Object
org.jupnp.model.resource.Resource<M>
Typparameter:
M - The type of the model object.
Bekannte direkte Unterklassen:
DeviceDescriptorResource, IconResource, ServiceControlResource, ServiceDescriptorResource, ServiceEventCallbackResource, ServiceEventSubscriptionResource

public class Resource<M> extends Object
An addressable object, stored, managed, and accessible through the Registry.
Autor:
Christian Bauer
  • Konstruktordetails

    • Resource

      public Resource(URI pathQuery, M model)
      Parameter:
      pathQuery - The path and (optional) query URI parts of this resource.
      model - The model object.
  • Methodendetails

    • getPathQuery

      public URI getPathQuery()
    • getModel

      public M getModel()
    • matches

      public boolean matches(URI pathQuery)
      Parameter:
      pathQuery - A relative URI.
      Gibt zurück:
      true if the given URI path and query matches the resource's path and query.
    • maintain

      public void maintain(List<Runnable> pendingExecutions, ExpirationDetails expirationDetails)
      Called periodically by the registry to maintain the resource.

      NOOP by default.

      Parameter:
      pendingExecutions - Add Runnable's to this collection if maintenance code has to run in the background.
      expirationDetails - The details of this resource's expiration, e.g. when it will expire.
    • shutdown

      public void shutdown()
      Called by the registry when it stops, in the shutdown thread.

      NOOP by default.

    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object