org.nhindirect.xd.routing.impl
Class RoutingResolverImpl

java.lang.Object
  extended by org.nhindirect.xd.routing.RoutingResolver
      extended by org.nhindirect.xd.routing.impl.RoutingResolverImpl

public class RoutingResolverImpl
extends RoutingResolver

Default implementation of a RoutingResolver.

Author:
beau

Constructor Summary
RoutingResolverImpl()
          Construct a RoutingResolverImpl without a configuration service backing.
RoutingResolverImpl(String configServiceUrl)
          Construct a RoutingResolverImpl with a configuration service backing.
 
Method Summary
 boolean isSmtpEndpoint(String address)
          Determine whether or not the provided address resolves to an SMTP endpoint.
 boolean isXdEndpoint(String address)
          Determine whether or not the provided address resolves to an XD endpoint.
 String resolve(String address)
          Resolve an address to a stored value.
 
Methods inherited from class org.nhindirect.xd.routing.RoutingResolver
getSmtpEndpoints, getXdEndpoints, hasSmtpEndpoints, hasXdEndpoints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoutingResolverImpl

public RoutingResolverImpl()
Construct a RoutingResolverImpl without a configuration service backing.


RoutingResolverImpl

public RoutingResolverImpl(String configServiceUrl)
Construct a RoutingResolverImpl with a configuration service backing.

Parameters:
configServiceUrl - The configuration service backing.
Method Detail

resolve

public String resolve(String address)
Description copied from class: RoutingResolver
Resolve an address to a stored value.

Specified by:
resolve in class RoutingResolver
Parameters:
address - The address to resolve.
Returns:
the stored value for the address, or the address itself if no value is stored.

isSmtpEndpoint

public boolean isSmtpEndpoint(String address)
Description copied from class: RoutingResolver
Determine whether or not the provided address resolves to an SMTP endpoint.

Specified by:
isSmtpEndpoint in class RoutingResolver
Parameters:
address - The address to resolve.
Returns:

isXdEndpoint

public boolean isXdEndpoint(String address)
Description copied from class: RoutingResolver
Determine whether or not the provided address resolves to an XD endpoint.

Specified by:
isXdEndpoint in class RoutingResolver
Parameters:
address - The address to resolve.
Returns:
true if the address maps to an XD endpoint, false otherwise.


Copyright © 2010-2011. All Rights Reserved.