Class ServerUDTInputStream

  • All Implemented Interfaces:
    ServerStream, de.aristaflow.adept2.model.communication.ServerSideProxy, de.aristaflow.adept2.model.communication.TimeTrackingSsProxy, Closeable, AutoCloseable

    public class ServerUDTInputStream
    extends ServerInputStream
    This interface resembles a UDTValue but does not provide all data at once but as requested, that is, the value of this UDTValue will not be provided as a whole but incrementally as requested. This significantly improves memory usage.
    See Also:
    UDTValue
    • Field Detail

      • userDefinedTypeName

        protected final String userDefinedTypeName
        The name of the user-defined type.
    • Constructor Detail

      • ServerUDTInputStream

        public ServerUDTInputStream​(InputStream in,
                                    String userDefinedType,
                                    long initialAliveTime,
                                    long aliveTimeExtension)
        Creates a new UDTValue as ServerInputStream that is all data will be transfered as requested.
        Parameters:
        in - The input stream providing the value for this UDTValue. The InputStream will be coupled to this ServerUDTInputStream, so do not close it; clone it if required longer than this ServerUDTInputStream.
        userDefinedType - The name of the user-defined type of the value. the name of the user defined type
        initialAliveTime - The initial time in milliseconds this server stream remains open before automatically being closed.
        aliveTimeExtension - The time in milliseconds to extend the alive time when accessing this server stream.
      • ServerUDTInputStream

        public ServerUDTInputStream​(UDTValue value,
                                    long initialAliveTime,
                                    long aliveTimeExtension)
                             throws IOException
        Creates a new ServerInputStream for the designated UDTValue.
        Parameters:
        value - The UDTValue providing the necessary information for the ServerUDTInputStream to create. closing will not affect the ServerUDTInputStream.
        initialAliveTime - The initial time in milliseconds this server stream remains open before automatically being closed.
        aliveTimeExtension - The time in milliseconds to extend the alive time when accessing this server stream.
        Throws:
        IOException - If there are problems retrieving the input stream from the designated UDTValue, an IOException will be thrown.
    • Method Detail

      • getUserDefinedType

        public String getUserDefinedType()
        Gets the name (a string) of the user-defined type of this value.
        Returns:
        The name of the user-defined data type of this value.