This class implements the tca scheme. More...
#include <TCAScheme.h>
Public Member Functions | |
virtual bool | validate (const URI &uri, bool is_pattern=false) |
Validate that the SSP in the given URI is legitimate for this scheme. | |
virtual bool | match (const EndpointIDPattern &pattern, const EndpointID &eid) |
Match the pattern to the endpoint id in a scheme-specific manner. | |
virtual bool | append_service_tag (URI *uri, const char *tag) |
Append the given service tag to the URI in a scheme-specific manner. | |
virtual singleton_info_t | is_singleton (const URI &uri) |
Check if the given URI is a singleton EID. | |
Private Member Functions | |
TCAScheme () | |
Friends | |
class | oasys::Singleton< TCAScheme > |
This class implements the tca scheme.
SSPs for this scheme take the canonical form:
tca://<router identifier (guid)>[/<application tag>="">]
Where "router identifier" is a globally unique identifier. In practice, this will often be the DNS-style "hostname" string of an internet host, for the more-or-less static "infrastructure" nodes that make up the routers and gateways of the TCA network. For the true TCA mobiles, it may be something quite different, like the sha1 hash of an email address for example.
"application tag" is any string of URI-valid characters.
This implementation also supports limited wildcard matching for endpoint patterns.
Definition at line 46 of file TCAScheme.h.
dtn::TCAScheme::TCAScheme | ( | ) | [inline, private] |
Definition at line 80 of file TCAScheme.h.
Append the given service tag to the URI in a scheme-specific manner.
Append the given service tag to the ssp in a scheme-specific manner.
Reimplemented from dtn::Scheme.
Definition at line 152 of file TCAScheme.cc.
Scheme::singleton_info_t dtn::TCAScheme::is_singleton | ( | const URI & | uri | ) | [virtual] |
Check if the given URI is a singleton EID.
Implements dtn::Scheme.
Definition at line 164 of file TCAScheme.cc.
References dtn::EndpointID::MULTINODE, and dtn::EndpointID::SINGLETON.
bool dtn::TCAScheme::match | ( | const EndpointIDPattern & | pattern, | |
const EndpointID & | eid | |||
) | [virtual] |
Match the pattern to the endpoint id in a scheme-specific manner.
Match the given ssp with the given pattern.
Implements dtn::Scheme.
Definition at line 64 of file TCAScheme.cc.
References ASSERT, dtn::EndpointID::known_scheme(), dtn::EndpointID::scheme(), dtn::EndpointID::ssp(), and dtn::EndpointID::uri().
Validate that the SSP in the given URI is legitimate for this scheme.
If the 'is_pattern' paraemeter is true, then the ssp is being validated as an EndpointIDPattern.
If the 'is_pattern' parameter is true, then the ssp is being validated as an EndpointIDPattern.
Implements dtn::Scheme.
Definition at line 40 of file TCAScheme.cc.
friend class oasys::Singleton< TCAScheme > [friend] |
Definition at line 79 of file TCAScheme.h.