Package nds2

Class connection

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class connection
    extends java.lang.Object
    implements java.io.Closeable

    A connection to the NDS/NDS2 server

    The connection object is used to interact with the NDS (v1 or v2) servers to retrieve
    data and channel lists.
    Connnection objects have a few main categories of methods:
    1. Data retreival (fetch and iterate)
    2. Channel listing (find_channels)

    In addition there are methods designed to deal with the volume of data and channels in a NDS2 server:
    1. Setting limits/epochs on requests (get_epoch, set_epoch, current_epoch)
    2. Channel availability checking (get_availability)

    • Field Detail

      • swigCMemOwn

        protected transient boolean swigCMemOwn
      • PROTOCOL_INVALID

        public static final int PROTOCOL_INVALID
      • PROTOCOL_ONE

        public static final int PROTOCOL_ONE
      • PROTOCOL_TWO

        public static final int PROTOCOL_TWO
      • PROTOCOL_TRY

        public static final int PROTOCOL_TRY
      • DEFAULT_PORT

        public static final int DEFAULT_PORT
      • FAST_STRIDE

        public static final int FAST_STRIDE
      • AUTO_STRIDE

        public static final int AUTO_STRIDE
    • Constructor Detail

      • connection

        protected connection​(long cPtr,
                             boolean cMemoryOwn)
      • connection

        public connection​(java.lang.String host,
                          int port,
                          int protocol)
      • connection

        public connection​(java.lang.String host,
                          int port)
      • connection

        public connection​(java.lang.String host)
      • connection

        public connection​(parameters params)
      • connection

        public connection()
    • Method Detail

      • getCPtr

        protected static long getCPtr​(connection obj)
      • finalize

        protected void finalize()
        Overrides:
        finalize in class java.lang.Object
      • delete

        public void delete()
      • iterate

        public connection_iterator iterate​(java.lang.String[] Channels)
                                    throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException
      • iterate

        public connection_iterator iterate​(int Stride,
                                           java.lang.String[] Channels)
                                    throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException
      • iterate

        public connection_iterator iterate​(int Start,
                                           int Stop,
                                           java.lang.String[] Channels)
                                    throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException
      • iterate

        public connection_iterator iterate​(int Start,
                                           int Stop,
                                           int Stride,
                                           java.lang.String[] Channels)
                                    throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • countChannels

        public long countChannels​(java.lang.String channel_glob,
                                  int channel_type_mask,
                                  int data_type_mask,
                                  double min_sample_rate,
                                  double max_sample_rate)
      • countChannels

        public long countChannels​(java.lang.String channel_glob,
                                  int channel_type_mask,
                                  int data_type_mask,
                                  double min_sample_rate)
      • countChannels

        public long countChannels​(java.lang.String channel_glob,
                                  int channel_type_mask,
                                  int data_type_mask)
      • countChannels

        public long countChannels​(java.lang.String channel_glob,
                                  int channel_type_mask)
      • countChannels

        public long countChannels​(java.lang.String channel_glob)
      • countChannels

        public long countChannels()
      • findChannels

        public channel[] findChannels​(java.lang.String channel_glob,
                                      int channel_type_mask,
                                      int data_type_mask,
                                      double min_sample_rate,
                                      double max_sample_rate)
      • findChannels

        public channel[] findChannels​(java.lang.String channel_glob,
                                      int channel_type_mask,
                                      int data_type_mask,
                                      double min_sample_rate)
      • findChannels

        public channel[] findChannels​(java.lang.String channel_glob,
                                      int channel_type_mask,
                                      int data_type_mask)
      • findChannels

        public channel[] findChannels​(java.lang.String channel_glob,
                                      int channel_type_mask)
      • findChannels

        public channel[] findChannels​(java.lang.String channel_glob)
      • findChannels

        public channel[] findChannels()
      • setEpoch

        public boolean setEpoch​(java.lang.String epoch)
      • setEpoch

        public boolean setEpoch​(int gps_start,
                                int gps_stop)
      • currentEpoch

        public epoch currentEpoch()
      • check

        public boolean check​(int gps_start,
                             int gps_stop,
                             java.lang.String[] channel_names)
      • fetch

        public buffer[] fetch​(int gps_start,
                              int gps_stop,
                              java.lang.String[] channel_names)
      • getHost

        public java.lang.String getHost()
      • getPort

        public int getPort()
      • getProtocol

        public int getProtocol()
      • setParameter

        public boolean setParameter​(java.lang.String parameter,
                                    java.lang.String value)
      • getParameter

        public java.lang.String getParameter​(java.lang.String parameter)
      • iterate_base

        protected connection iterate_base​(int gps_start,
                                          int gps_stop,
                                          int stride,
                                          java.lang.String[] channel_names)
      • iterate_base

        protected connection iterate_base​(java.lang.String[] channel_names)
      • iterate_base

        protected connection iterate_base​(int stride,
                                          java.lang.String[] channel_names)
      • iterate_base

        protected connection iterate_base​(int gps_start,
                                          int gps_stop,
                                          java.lang.String[] channel_names)
      • next

        public buffer[] next()
      • requestInProgress

        public boolean requestInProgress()
      • shutdown

        public void shutdown()