org.jpu.patterns.serviceLocator
Class Locator.DefaultNarrowStrategy

java.lang.Object
  extended byorg.jpu.patterns.serviceLocator.Locator.DefaultNarrowStrategy
All Implemented Interfaces:
ILocator.INarrowStrategy
Enclosing class:
Locator

public static class Locator.DefaultNarrowStrategy
extends java.lang.Object
implements ILocator.INarrowStrategy

Simple narrow strategy implementation based on "PortableRemoteObject.narrow()".


Constructor Summary
Locator.DefaultNarrowStrategy()
           
 
Method Summary
 java.lang.Object narrow(java.lang.Object o, java.lang.Class c)
          Narrows the given object to the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Locator.DefaultNarrowStrategy

public Locator.DefaultNarrowStrategy()
Method Detail

narrow

public java.lang.Object narrow(java.lang.Object o,
                               java.lang.Class c)
                        throws ServiceLocatorException
Description copied from interface: ILocator.INarrowStrategy
Narrows the given object to the given type. If either o or c are null, this method returns o. Otherwise it attempts to narrow using PortableRemoteObject.narrow() and rethrows any exceptions as ServiceLocatorException, wrapping the original exception.

Subclasses are free to override this method; in particular, local homes should not be narrowed using PortableRemoteObject.narrow().

Specified by:
narrow in interface ILocator.INarrowStrategy
Throws:
ServiceLocatorException


Copyright (c) 2001-2003 - Apache Software Foundation