Class VNS

  • All Implemented Interfaces:
    TransportableFactory, VinciServable

    public class VNS
    extends VinciServableAdapter
    VNS (Vinci Naming Service) provides the "directory" of all available Vinci services. VNS must be running somewhere on the network for VinciClient and VinciServer classes to function. These classes consult org.apache.vinci.transport.vns.client.VNSConfig to determine the location of the VNS service.
    • Constructor Detail

      • VNS

        public VNS()
      • VNS

        public VNS​(int port)
      • VNS

        public VNS​(int port,
                   java.lang.String logFile)
            throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • startServing

        public static void startServing()
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • loadConfig

        public boolean loadConfig​(java.lang.String cFile)
      • loadWorkspaces

        public void loadWorkspaces​(java.lang.String wFile)
      • loadCounters

        public void loadCounters​(java.lang.String cFile)
      • saveConfig

        public void saveConfig​(java.lang.String cFile)
      • saveCounters

        public void saveCounters​(java.lang.String cFile)
      • saveWorkspaces

        public void saveWorkspaces​(java.lang.String wFile)
      • eval

        public Transportable eval​(Transportable inp)
                           throws ServiceException
        Description copied from interface: VinciServable
        The eval method accepts an input document and returns an output document that is the result of performing the service.
        Specified by:
        eval in interface VinciServable
        Specified by:
        eval in class VinciServableAdapter
        Parameters:
        inp - The input document
        Returns:
        The output document
        Throws:
        ServiceException - thrown when there is an application level error that should result in the client receiving the same ServiceException on the other end.
      • strip

        public static java.lang.String strip​(java.lang.String s)
      • emptyString

        public static java.lang.String emptyString​(java.lang.String s)