dtn::DTNScheme Class Reference

#include <DTNScheme.h>

Inheritance diagram for dtn::DTNScheme:

dtn::Scheme

List of all members.


Detailed Description

This class implements the one default scheme as specified in the bundle protocol.

SSPs for this scheme take the canonical forms:

dtn://<router identifier>="">[/<application tag>="">] dtn:none

Where "router identifier" is a DNS-style "hostname" string, however not necessarily a valid internet hostname, and "application tag" is any string of URI-valid characters.

The special endpoint identifier "dtn:none" is used to represent the null endpoint.

This implementation also supports limited wildcard matching for endpoint patterns.

Definition at line 44 of file DTNScheme.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 bool append_service_wildcard (URI *uri)
 Append a wildcard tag to the uri in a scheme-specific manner.
virtual bool remove_service_tag (URI *uri)
 Reduce URI to node ID 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

 DTNScheme ()

Friends

class oasys::Singleton< DTNScheme >

Constructor & Destructor Documentation

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

Definition at line 96 of file DTNScheme.h.


Member Function Documentation

bool dtn::DTNScheme::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

Implements dtn::Scheme.

Definition at line 35 of file DTNScheme.cc.

bool dtn::DTNScheme::match ( const EndpointIDPattern pattern,
const EndpointID eid 
) [virtual]

Match the pattern to the endpoint id in a scheme-specific manner.

Implements dtn::Scheme.

Definition at line 55 of file DTNScheme.cc.

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

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

Append the given service tag to the uri 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 133 of file DTNScheme.cc.

bool dtn::DTNScheme::append_service_wildcard ( URI uri  )  [virtual]

Append a wildcard tag to the uri in a scheme-specific manner.

Returns:
true if this scheme is capable of wildcards and the wildcard is appended, false otherwise.

Reimplemented from dtn::Scheme.

Definition at line 145 of file DTNScheme.cc.

bool dtn::DTNScheme::remove_service_tag ( URI uri  )  [virtual]

Reduce URI to node ID in a scheme specific manner.

The default scheme is not capable of this.

Returns:
true if this scheme is capable of this reduction and the reduction is successful, else false.

Reimplemented from dtn::Scheme.

Definition at line 159 of file DTNScheme.cc.

Scheme::singleton_info_t dtn::DTNScheme::is_singleton ( const URI uri  )  [virtual]

Check if the given URI is a singleton EID.

Implements dtn::Scheme.

Definition at line 168 of file DTNScheme.cc.

References dtn::EndpointID::MULTINODE, and dtn::EndpointID::SINGLETON.


Friends And Related Function Documentation

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

Definition at line 95 of file DTNScheme.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