org.nhindirect.xd.routing
Class RoutingResolver

java.lang.Object
  extended by org.nhindirect.xd.routing.RoutingResolver
Direct Known Subclasses:
RoutingResolverImpl

public abstract class RoutingResolver
extends Object

Resolve an address for routing purposes.

Author:
beau

Constructor Summary
RoutingResolver()
           
 
Method Summary
 Collection<String> getSmtpEndpoints(Collection<String> addresses)
          Return a collection of SMTP endpoints from the provided collection of addresses.
 Collection<String> getXdEndpoints(Collection<String> addresses)
          Return a collection of XD endpoints from the provided collection of addresses.
 boolean hasSmtpEndpoints(Collection<String> addresses)
          Determine if the collection of addresses contains SMTP endpoints.
 boolean hasXdEndpoints(Collection<String> addresses)
          Determine if the collection of addresses contains XD endpoints.
abstract  boolean isSmtpEndpoint(String address)
          Determine whether or not the provided address resolves to an SMTP endpoint.
abstract  boolean isXdEndpoint(String address)
          Determine whether or not the provided address resolves to an XD endpoint.
abstract  String resolve(String address)
          Resolve an address to a stored value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoutingResolver

public RoutingResolver()
Method Detail

resolve

public abstract String resolve(String address)
Resolve an address to a stored value.

Parameters:
address - The address to resolve.
Returns:
the stored value for the address, or the address itself if no value is stored.

isXdEndpoint

public abstract boolean isXdEndpoint(String address)
Determine whether or not the provided address resolves to an XD endpoint.

Parameters:
address - The address to resolve.
Returns:
true if the address maps to an XD endpoint, false otherwise.

isSmtpEndpoint

public abstract boolean isSmtpEndpoint(String address)
Determine whether or not the provided address resolves to an SMTP endpoint.

Parameters:
address - The address to resolve.
Returns:

getSmtpEndpoints

public Collection<String> getSmtpEndpoints(Collection<String> addresses)
Return a collection of SMTP endpoints from the provided collection of addresses.

Parameters:
addresses - The collection of address from which to extract SMTP endpoints.
Returns:
the SMTP endpoints within the provided collection.

getXdEndpoints

public Collection<String> getXdEndpoints(Collection<String> addresses)
Return a collection of XD endpoints from the provided collection of addresses.

Parameters:
addresses - The collection of addresses from which to extract XD endpoints.
Returns:
the XD endpoints within the provided collection.

hasSmtpEndpoints

public boolean hasSmtpEndpoints(Collection<String> addresses)
Determine if the collection of addresses contains SMTP endpoints.

Parameters:
addresses - The collection of addresses to inspect.
Returns:
true if the collection contains SMTP endpoints, false otherwise.

hasXdEndpoints

public boolean hasXdEndpoints(Collection<String> addresses)
Determine if the collection of addresses contains XD endpoints.

Parameters:
addresses - The collection of addresses to inspect.
Returns:
true if the collection contains XD endpoints, false otherwise.


Copyright © 2010-2011. All Rights Reserved.