public class ServiceDescriptionBuilder extends Object
A convenient builder for service descriptions.
In Eclipse, you can register this class as a favorite ("Preferences" - "Java" - "Editor" - "Content Assist" - "Favorites"). Content assist will then propose the builder even if the import is missing.
ServiceDescription
,
ServiceDescriptionBuffer
,
FIPA Agent
Management Specification, Section 6.1.3Modifier and Type | Method and Description |
---|---|
static ServiceDescriptionBuilder |
aService()
Creates a builder for service descriptions.
|
ServiceDescription |
build()
Builds the service description defined by this builder.
|
ServiceDescriptionBuilder |
byOwner(Ownership ownership)
Sets the owner of the service.
|
ServiceDescriptionBuilder |
named(ServiceIdentifier name)
Sets the name of the service.
|
ServiceDescriptionBuilder |
ofType(ServiceType type)
Sets the type of the service.
|
ServiceDescriptionBuilder |
supporting(ProtocolIdentifier protocol)
Adds a supported protocol to the description.
|
ServiceDescriptionBuilder |
understanding(LanguageIdentifier language)
Adds a language to the description.
|
ServiceDescriptionBuilder |
understanding(OntologyIdentifier ontology)
Adds an ontology to the description.
|
ServiceDescriptionBuilder |
withProperty(Property property)
Adds a property to the description.
|
public static ServiceDescriptionBuilder aService()
public ServiceDescriptionBuilder named(ServiceIdentifier name)
name
- the name of the serviceIllegalStateException
- if the name is already setNullPointerException
- if the name is null
public ServiceDescriptionBuilder ofType(ServiceType type)
type
- the type of the serviceIllegalStateException
- if the name is already setNullPointerException
- if the name is null
public ServiceDescriptionBuilder supporting(ProtocolIdentifier protocol)
protocol
- the protocol to be addedNullPointerException
- if the protocol is null
public ServiceDescriptionBuilder understanding(OntologyIdentifier ontology)
ontology
- the ontology to be addedNullPointerException
- if the ontology is null
public ServiceDescriptionBuilder understanding(LanguageIdentifier language)
language
- the language to be addedNullPointerException
- if the language is null
public ServiceDescriptionBuilder byOwner(Ownership ownership)
ownership
- the owner of the serviceIllegalStateException
- if the name is already setNullPointerException
- if the name is null
public ServiceDescriptionBuilder withProperty(Property property)
property
- the language to be addedNullPointerException
- if the property is null
public ServiceDescription build()
Copyright © Aimpulse Intelligent Systems GmbH
All rights reserved.