Class ServiceDiscoveryContent

java.lang.Object
i5.las2peer.communication.ServiceDiscoveryContent
All Implemented Interfaces:
Serializable

public class ServiceDiscoveryContent extends Object implements Serializable
See Also:
  • Constructor Details

    • ServiceDiscoveryContent

      public ServiceDiscoveryContent(ServiceNameVersion requestedService, boolean exact)
      creates a request
      Parameters:
      requestedService - A service name and version
      exact - If true the versions must match exactly
    • ServiceDiscoveryContent

      public ServiceDiscoveryContent(String agentId, ServiceNameVersion serviceNameVersion)
      creates a response
      Parameters:
      agentId - An agent identifier
      serviceNameVersion - A service name and version
  • Method Details

    • isRequest

      public boolean isRequest()
      check if its a request
      Returns:
      Returns true if this is a request
    • getAgentId

      public String getAgentId()
      Gets the service agent id for this discovery
      Returns:
      Returns the service agent id
    • getService

      public ServiceNameVersion getService()
      Gets the service that is running
      Returns:
      Returns the service name and version
    • accepts

      public boolean accepts(ServiceNameVersion service)
      checks if the service is accepted by this request
      Parameters:
      service - A service name and version
      Returns:
      Returns true if the service is accepted