org.apache.oozie.service
Class URIHandlerService

java.lang.Object
  extended by org.apache.oozie.service.URIHandlerService
All Implemented Interfaces:
Service

public class URIHandlerService
extends Object
implements Service


Field Summary
static String URI_HANDLER_DEFAULT
           
static String URI_HANDLER_SUPPORTED_SCHEMES_PREFIX
           
static String URI_HANDLER_SUPPORTED_SCHEMES_SUFFIX
           
static String URI_HANDLERS
           
 
Fields inherited from interface org.apache.oozie.service.Service
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
URIHandlerService()
           
 
Method Summary
 void destroy()
          Destroy the service.
 URI getAuthorityWithScheme(String uri)
          Get the URI with scheme://host:port removing the path
 Set<Class<?>> getClassesForLauncher()
          Return the classes to be shipped to the launcher
 Class<? extends Service> getInterface()
          Return the public interface of the service.
 org.apache.hadoop.conf.Configuration getLauncherConfig()
          Return the configuration required to use LauncherURIHandler in the launcher
 URIHandler getURIHandler(String uri)
           
 URIHandler getURIHandler(URI uri)
           
 URIHandler getURIHandler(URI uri, boolean validateURI)
           
 void init(Services services)
          Initialize the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URI_HANDLERS

public static final String URI_HANDLERS
See Also:
Constant Field Values

URI_HANDLER_DEFAULT

public static final String URI_HANDLER_DEFAULT
See Also:
Constant Field Values

URI_HANDLER_SUPPORTED_SCHEMES_PREFIX

public static final String URI_HANDLER_SUPPORTED_SCHEMES_PREFIX
See Also:
Constant Field Values

URI_HANDLER_SUPPORTED_SCHEMES_SUFFIX

public static final String URI_HANDLER_SUPPORTED_SCHEMES_SUFFIX
See Also:
Constant Field Values
Constructor Detail

URIHandlerService

public URIHandlerService()
Method Detail

init

public void init(Services services)
          throws ServiceException
Description copied from interface: Service
Initialize the service.

Invoked by the Service singleton at start up time.

Specified by:
init in interface Service
Parameters:
services - services singleton initializing the service.
Throws:
ServiceException - thrown if the service could not initialize.

destroy

public void destroy()
Description copied from interface: Service
Destroy the service.

Invoked by the Service singleton at shutdown time.

Specified by:
destroy in interface Service

getInterface

public Class<? extends Service> getInterface()
Description copied from interface: Service
Return the public interface of the service.

Services are retrieved by its public interface. Specializations of services must return the public interface.

Specified by:
getInterface in interface Service
Returns:
the interface of the service.

getClassesForLauncher

public Set<Class<?>> getClassesForLauncher()
Return the classes to be shipped to the launcher

Returns:
the set of classes to be shipped to the launcher

getLauncherConfig

public org.apache.hadoop.conf.Configuration getLauncherConfig()
Return the configuration required to use LauncherURIHandler in the launcher

Returns:
configuration

getURIHandler

public URIHandler getURIHandler(String uri)
                         throws URIHandlerException
Throws:
URIHandlerException

getURIHandler

public URIHandler getURIHandler(URI uri)
                         throws URIHandlerException
Throws:
URIHandlerException

getURIHandler

public URIHandler getURIHandler(URI uri,
                                boolean validateURI)
                         throws URIHandlerException
Throws:
URIHandlerException

getAuthorityWithScheme

public URI getAuthorityWithScheme(String uri)
                           throws URIHandlerException
Get the URI with scheme://host:port removing the path

Parameters:
uri - uri template
Returns:
URI with authority and scheme
Throws:
URIHandlerException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.