public class AgentDescriptionBuilder extends Object
A convenient builder for directory agent 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.
AgentDescription
,
AgentDescriptionBuffer
,
FIPA Agent
Management Specification, Section 6.1.2Modifier and Type | Method and Description |
---|---|
static AgentDescriptionBuilder |
anAgent()
Creates a builder for directory agent descriptions.
|
AgentDescription |
build()
Builds the directory agent description defined by this builder.
|
AgentDescriptionBuilder |
named(AgentIdentifier name)
Sets the name of the agent.
|
AgentDescriptionBuilder |
offering(ServiceDescription service)
Adds an offered service to the description.
|
AgentDescriptionBuilder |
supporting(ProtocolIdentifier protocol)
Adds a supported protocol to the description.
|
AgentDescriptionBuilder |
understanding(LanguageIdentifier language)
Adds a language to the description.
|
AgentDescriptionBuilder |
understanding(OntologyIdentifier ontology)
Adds an ontology to the description.
|
AgentDescriptionBuilder |
withLeaseTime(Timestamp leaseTime)
Sets an expiration time for the description.
|
AgentDescriptionBuilder |
withScope(Scope scope)
Adds a scope for the description.
|
public static AgentDescriptionBuilder anAgent()
public AgentDescriptionBuilder named(AgentIdentifier name)
name
- the name of the agentIllegalStateException
- if the name is already setNullPointerException
- if the name is null
public AgentDescriptionBuilder offering(ServiceDescription service)
service
- the service to be addedNullPointerException
- if the service is null
public AgentDescriptionBuilder supporting(ProtocolIdentifier protocol)
protocol
- the protocol to be addedNullPointerException
- if the protocol is null
public AgentDescriptionBuilder understanding(OntologyIdentifier ontology)
ontology
- the ontology to be addedNullPointerException
- if the ontology is null
public AgentDescriptionBuilder understanding(LanguageIdentifier language)
language
- the language to be addedNullPointerException
- if the language is null
public AgentDescriptionBuilder withLeaseTime(Timestamp leaseTime)
leaseTime
- the expiration time to be setIllegalStateException
- if the expiration time is already setpublic AgentDescriptionBuilder withScope(Scope scope)
scope
- the scope to be addedNullPointerException
- if the scope is null
public AgentDescription build()
Copyright © Aimpulse Intelligent Systems GmbH
All rights reserved.