Package i5.las2peer.communication
Class ServiceDiscoveryContent
java.lang.Object
i5.las2peer.communication.ServiceDiscoveryContent
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionServiceDiscoveryContent(ServiceNameVersion requestedService, boolean exact) creates a requestServiceDiscoveryContent(String agentId, ServiceNameVersion serviceNameVersion) creates a response -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(ServiceNameVersion service) checks if the service is accepted by this requestGets the service agent id for this discoveryGets the service that is runningbooleancheck if its a request
-
Constructor Details
-
ServiceDiscoveryContent
creates a request- Parameters:
requestedService- A service name and versionexact- If true the versions must match exactly
-
ServiceDiscoveryContent
creates a response- Parameters:
agentId- An agent identifierserviceNameVersion- 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
Gets the service agent id for this discovery- Returns:
- Returns the service agent id
-
getService
Gets the service that is running- Returns:
- Returns the service name and version
-
accepts
checks if the service is accepted by this request- Parameters:
service- A service name and version- Returns:
- Returns true if the service is accepted
-