Srv
Date: 2014-11-12

org.gcube.informationsystem.cache

## Class Srv

- java.lang.Object
- - org.gcube.informationsystem.cache.Srv

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

      public class Srv
      extends java.lang.Object
      implements java.io.Serializable, java.lang.Cloneable

  Srv class represents a service entity
  Author:
    UoA
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Srv(java.lang.String srvClass, java.lang.String srvName)` Constructor
    `Srv(java.lang.String srvClass, java.lang.String srvName, java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>> h)` Constructor
    `Srv(java.lang.String srvClass, java.lang.String srvName, java.lang.String portTypeName)` Constructor
    `Srv(java.lang.String srvClass, java.lang.String srvName, java.lang.String portTypeName, java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>> h)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clone Srv object.
    `boolean` | `equals(java.lang.Object o)` equals method.
    `void` | `forceRefreshService()`
    `java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>>` | `getEprs()`
    `java.util.Set<org.apache.axis.message.addressing.EndpointReference>` | `getEPRs()`
    `java.util.Set<org.apache.axis.message.addressing.EndpointReference>` | `getEPRs(java.lang.String serviceType)`
    `java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>>` | `getFilterCriteria()`
    `protected ConsistencyManagerIF` | `getMyManager()`
    `java.lang.String` | `getPortTypeName()` Get portType name
    `protected GCUBEScope` | `getScope()`
    `java.lang.String` | `getSrvClass()` Get service class
    `java.lang.String` | `getSrvName()` Get service name
    `java.util.Set<org.apache.axis.message.addressing.EndpointReference>` | `goForFactory()` Invoked if the service is a factory service.
    `java.util.Set<org.apache.axis.message.addressing.EndpointReference>` | `goForSimple()` Invoked if the service is a simple web service.
    `java.util.Set<org.apache.axis.message.addressing.EndpointReference>` | `goForStateful()` Invoked if the service is a ws-resource.
    `int` | `hashCode()`
    `static boolean` | `isServiceTypeValid(java.lang.String srvType)`
    `static void` | `main(java.lang.String[] args)`
    `void` | `setEprs(java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>> eprs)`
    `void` | `setFilterCriteria(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> filterCriteria)`
    `protected void` | `setMyManager(ConsistencyManagerIF myManager)`
    `void` | `setPortTypeName(java.lang.String portTypeName)` Set portType name
    `protected void` | `setScope(GCUBEScope scope)`
    `void` | `setSrv(java.lang.String srvClass, java.lang.String srvName)` Atomic setter
    `void` | `setSrv(java.lang.String srvClass, java.lang.String srvName, java.lang.String portTypeName)` Atomic setter
    `void` | `setSrvClass(java.lang.String srvClass)` Set service class
    `void` | `setSrvName(java.lang.String srvName)` Set service name
    `java.lang.String` | `toString()` toString

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Srv

          public Srv(java.lang.String srvClass,
             java.lang.String srvName)

      Constructor
      Parameters:
        `srvClass` - service class
        `srvName` - service name

    - #### Srv

          public Srv(java.lang.String srvClass,
             java.lang.String srvName,
             java.lang.String portTypeName)

      Constructor
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `portTypeName` - portType specific name

    - #### Srv

          public Srv(java.lang.String srvClass,
             java.lang.String srvName,
             java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>> h)

      Constructor
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `h` - `filterCriteria` instance

    - #### Srv

          public Srv(java.lang.String srvClass,
             java.lang.String srvName,
             java.lang.String portTypeName,
             java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>> h)

      Constructor
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `portTypeName` - portType specific name
        `h` - `filterCriteria` instance

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object o)

      equals method.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `o` - object to compare against
      Returns:
        true if both objects are equal; false otherwise
      See Also:
        `Object.equals(Object)`

    - #### setSrv

          public void setSrv(java.lang.String srvClass,
                    java.lang.String srvName)

      Atomic setter
      Parameters:
        `srvClass` - service class
        `srvName` - service name

    - #### setSrv

          public void setSrv(java.lang.String srvClass,
                    java.lang.String srvName,
                    java.lang.String portTypeName)

      Atomic setter
      Parameters:
        `srvClass` - service class
        `srvName` - service name
        `portTypeName` - portType name

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Clone Srv object.
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        new cloned object
      Throws:
        `java.lang.CloneNotSupportedException` - in case of CloneNotSupported

    - #### toString

          public java.lang.String toString()

      toString
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        string representation of this object

    - #### goForSimple

          public java.util.Set<org.apache.axis.message.addressing.EndpointReference> goForSimple()
                                                                                          throws ISUnsupportedQueryException,
                                                                                                 java.lang.InstantiationException,
                                                                                                 java.lang.IllegalAccessException,
                                                                                                 java.lang.Exception

      Invoked if the service is a simple web service.
      Returns:
        corresponding RIs
      Throws:
        `ISUnsupportedQueryException` - in case of error
        `java.lang.InstantiationException` - in case of error
        `java.lang.IllegalAccessException` - in case of error
        `java.lang.Exception` - in case of error

    - #### goForFactory

          public java.util.Set<org.apache.axis.message.addressing.EndpointReference> goForFactory()
                                                                                           throws ISUnsupportedQueryException,
                                                                                                  java.lang.InstantiationException,
                                                                                                  java.lang.IllegalAccessException,
                                                                                                  java.lang.Exception

      Invoked if the service is a factory service.
      Returns:
        corresponding RIs
      Throws:
        `ISUnsupportedQueryException` - in case of error
        `java.lang.InstantiationException` - in case of error
        `java.lang.IllegalAccessException` - in case of error
        `java.lang.Exception` - in case of error

    - #### goForStateful

          public java.util.Set<org.apache.axis.message.addressing.EndpointReference> goForStateful()
                                                                                            throws ISUnsupportedQueryException,
                                                                                                   java.lang.InstantiationException,
                                                                                                   java.lang.IllegalAccessException,
                                                                                                   java.lang.Exception

      Invoked if the service is a ws-resource. Note that the respective IS query is slightly changed compared to the other service types. It only retrieves RIs if their is an existing, running ws-resource.
      Returns:
        corresponding RIs
      Throws:
        `ISUnsupportedQueryException` - in case of error
        `java.lang.InstantiationException` - in case of error
        `java.lang.IllegalAccessException` - in case of error
        `java.lang.Exception` - in case of error

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`
      See Also:
        `Object.hashCode()`

    - #### forceRefreshService

          public void forceRefreshService()
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### main

          public static void main(java.lang.String[] args)

    - #### getSrvClass

          public java.lang.String getSrvClass()

      Get service class
      Returns:
        service class

    - #### getSrvName

          public java.lang.String getSrvName()

      Get service name
      Returns:
        service name

    - #### getPortTypeName

          public java.lang.String getPortTypeName()

      Get portType name
      Returns:
        portType name

    - #### setSrvClass

          public void setSrvClass(java.lang.String srvClass)

      Set service class
      Parameters:
        `srvClass` - service class

    - #### setSrvName

          public void setSrvName(java.lang.String srvName)

      Set service name
      Parameters:
        `srvName` - service name

    - #### setPortTypeName

          public void setPortTypeName(java.lang.String portTypeName)

      Set portType name
      Parameters:
        `portTypeName` - portType name

    - #### setEprs

          public void setEprs(java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>> eprs)

      Parameters:
        `eprs` - the eprs to set

    - #### getEprs

          public java.util.HashMap<java.lang.String,java.util.Set<org.apache.axis.message.addressing.EndpointReference>> getEprs()

      Returns:
        the eprs

    - #### getEPRs

          public java.util.Set<org.apache.axis.message.addressing.EndpointReference> getEPRs()
                                                                                      throws java.lang.Exception

      Returns:
        the eprs
      Throws:
        `java.lang.Exception`

    - #### getEPRs

          public java.util.Set<org.apache.axis.message.addressing.EndpointReference> getEPRs(java.lang.String serviceType)
                                                                                      throws java.lang.Exception

      Returns:
        the eprs
      Throws:
        `java.lang.Exception`

    - #### setFilterCriteria

          public void setFilterCriteria(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> filterCriteria)

      Parameters:
        `filterCriteria` - the filterCriteria to set

    - #### getFilterCriteria

          public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> getFilterCriteria()

      Returns:
        the filterCriteria

    - #### setMyManager

          protected void setMyManager(ConsistencyManagerIF myManager)

      Parameters:
        `myManager` - the myManager to set

    - #### getMyManager

          protected ConsistencyManagerIF getMyManager()

      Returns:
        the myManager

    - #### isServiceTypeValid

          public static boolean isServiceTypeValid(java.lang.String srvType)

    - #### setScope

          protected void setScope(GCUBEScope scope)

      Parameters:
        `scope` - the scope to set

    - #### getScope

          protected GCUBEScope getScope()

      Returns:
        the scope