dtn::TCAScheme Class Reference

#include <TCAScheme.h>

Inheritance diagram for dtn::TCAScheme:

dtn::Scheme

List of all members.


Detailed Description

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.


Public Member Functions

virtual bool validate (const std::string &ssp, bool is_pattern=false)
 Validate that the given ssp 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 (std::string *ssp, const char *tag)
 Append the given service tag to the ssp in a scheme-specific manner.

Private Member Functions

 TCAScheme ()

Friends

class oasys::Singleton< TCAScheme >

Constructor & Destructor Documentation

dtn::TCAScheme::TCAScheme (  )  [inline, private]

Definition at line 75 of file TCAScheme.h.


Member Function Documentation

bool dtn::TCAScheme::validate ( const std::string &  ssp,
bool  is_pattern = false 
) [virtual]

Validate that the given ssp is legitimate for this scheme.

If the 'is_pattern' paraemeter is true, then the ssp is being validated as an EndpointIDPattern.

Returns:
true if valid
If the 'is_pattern' parameter is true, then the ssp is being validated as an EndpointIDPattern.

Returns:
true if valid

Implements dtn::Scheme.

Definition at line 39 of file TCAScheme.cc.

References oasys::URL::host_, log_debug_p, and oasys::URL::valid().

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.

Returns:
true if it matches

Implements dtn::Scheme.

Definition at line 87 of file TCAScheme.cc.

References ASSERT, dtn::EndpointID::c_str(), dtn::EndpointID::known_scheme(), log_debug_p, log_warn_p, dtn::EndpointID::scheme(), dtn::EndpointID::ssp(), and dtn::EndpointID::str().

bool dtn::TCAScheme::append_service_tag ( std::string *  ssp,
const char *  tag 
) [virtual]

Append the given service tag to the ssp in a scheme-specific manner.

Returns:
true if this scheme is capable of service tags and the tag is a legal one, false otherwise.

Reimplemented from dtn::Scheme.

Definition at line 193 of file TCAScheme.cc.


Friends And Related Function Documentation

friend class oasys::Singleton< TCAScheme > [friend]

Definition at line 74 of file TCAScheme.h.


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:36:22 2007 for DTN Reference Implementation by  doxygen 1.5.3