Class DispatchContext

  • All Implemented Interfaces:
    java.io.Serializable

    public class DispatchContext
    extends java.lang.Object
    implements java.io.Serializable
    Dispatcher Context
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Constructor Summary

      Constructors 
      Constructor Description
      DispatchContext​(java.lang.String name, java.lang.ClassLoader loader, LocalDispatcher dispatcher)
      Creates new DispatchContext as an immutable object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getAllServiceNames()  
      java.lang.ClassLoader getClassLoader()
      Gets the classloader of this context
      Delegator getDelegator()
      Gets the Delegator associated with this context/dispatcher
      LocalDispatcher getDispatcher()
      Gets the LocalDispatcher used with this context
      ModelService getModelService​(java.lang.String serviceName)
      Gets the ModelService instance that corresponds to given the name
      java.lang.String getName()
      Gets the name of the local dispatcher
      Security getSecurity()
      Gets the Security object associated with this dispatcher
      org.w3c.dom.Document getWSDL​(java.lang.String serviceName, java.lang.String locationURI)  
      java.util.Map<java.lang.String,​java.lang.Object> makeValidContext​(java.lang.String serviceName, java.lang.String mode, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Uses an existing map of name value pairs and extracts the keys which are used in serviceName Note: This goes not guarantee the context will be 100% valid, there may be missing fields
      static java.util.Map<java.lang.String,​java.lang.Object> makeValidContext​(ModelService model, java.lang.String mode, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Uses an existing map of name value pairs and extracts the keys which are used in serviceName Note: This goes not guarantee the context will be 100% valid, there may be missing fields
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • DispatchContext

        public DispatchContext​(java.lang.String name,
                               java.lang.ClassLoader loader,
                               LocalDispatcher dispatcher)
        Creates new DispatchContext as an immutable object. The "dispatcher" argument can be null if the "name" argument matches the name of a valid entity model reader. The thread safety of a DispatchContext object is a consequence of its immutability.
        Parameters:
        name - The immutable name of the DispatchContext
        loader - The immutable class loader
        dispatcher - The immutable dispatcher associated to the DispatchContext
    • Method Detail

      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Gets the classloader of this context
        Returns:
        ClassLoader of the context
      • getName

        public java.lang.String getName()
        Gets the name of the local dispatcher
        Returns:
        String name of the LocalDispatcher object
      • getDispatcher

        public LocalDispatcher getDispatcher()
        Gets the LocalDispatcher used with this context
        Returns:
        LocalDispatcher that was used to create this context
      • getDelegator

        public Delegator getDelegator()
        Gets the Delegator associated with this context/dispatcher
        Returns:
        Delegator associated with this context
      • getSecurity

        public Security getSecurity()
        Gets the Security object associated with this dispatcher
        Returns:
        Security object associated with this dispatcher
      • makeValidContext

        public java.util.Map<java.lang.String,​java.lang.Object> makeValidContext​(java.lang.String serviceName,
                                                                                       java.lang.String mode,
                                                                                       java.util.Map<java.lang.String,​? extends java.lang.Object> context)
                                                                                throws GenericServiceException
        Uses an existing map of name value pairs and extracts the keys which are used in serviceName Note: This goes not guarantee the context will be 100% valid, there may be missing fields
        Parameters:
        serviceName - The name of the service to obtain parameters for
        mode - The mode to use for building the new map (i.e. can be IN or OUT)
        context - The initial set of values to pull from
        Returns:
        Map contains any valid values
        Throws:
        GenericServiceException
      • makeValidContext

        public static java.util.Map<java.lang.String,​java.lang.Object> makeValidContext​(ModelService model,
                                                                                              java.lang.String mode,
                                                                                              java.util.Map<java.lang.String,​? extends java.lang.Object> context)
                                                                                       throws GenericServiceException
        Uses an existing map of name value pairs and extracts the keys which are used in serviceName Note: This goes not guarantee the context will be 100% valid, there may be missing fields
        Parameters:
        model - The ModelService object of the service to obtain parameters for
        mode - The mode to use for building the new map (i.e. can be IN or OUT)
        context - The initial set of values to pull from
        Returns:
        Map contains any valid values
        Throws:
        GenericServiceException
      • getModelService

        public ModelService getModelService​(java.lang.String serviceName)
                                     throws GenericServiceException
        Gets the ModelService instance that corresponds to given the name
        Parameters:
        serviceName - Name of the service
        Returns:
        GenericServiceModel that corresponds to the serviceName
        Throws:
        GenericServiceException
      • getAllServiceNames

        public java.util.Set<java.lang.String> getAllServiceNames()