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 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 >

Constructor & Destructor Documentation

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

Definition at line 80 of file TCAScheme.h.


Member Function Documentation

bool dtn::TCAScheme::validate ( const URI uri,
bool  is_pattern = false 
) [virtual]

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.

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 40 of file TCAScheme.cc.

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 64 of file TCAScheme.cc.

References ASSERT, dtn::EndpointID::known_scheme(), dtn::EndpointID::scheme(), dtn::EndpointID::ssp(), and dtn::EndpointID::uri().

bool dtn::TCAScheme::append_service_tag ( URI uri,
const char *  tag 
) [virtual]

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.

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 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.


Friends And Related Function Documentation

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

Definition at line 79 of file TCAScheme.h.


The documentation for this class was generated from the following files:

Generated on Mon Jul 21 14:12:21 2008 for DTN Reference Implementation by  doxygen 1.5.6