Package nds2
Class connection
- java.lang.Object
-
- nds2.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 Summary
Fields Modifier and Type Field Description static int
AUTO_STRIDE
static int
DEFAULT_PORT
static int
FAST_STRIDE
static int
PROTOCOL_INVALID
static int
PROTOCOL_ONE
static int
PROTOCOL_TRY
static int
PROTOCOL_TWO
protected boolean
swigCMemOwn
-
Constructor Summary
Constructors Modifier Constructor Description connection()
protected
connection(long cPtr, boolean cMemoryOwn)
connection(java.lang.String host)
connection(java.lang.String host, int port)
connection(java.lang.String host, int port, int protocol)
connection(parameters params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
check(int gps_start, int gps_stop, java.lang.String[] channel_names)
void
close()
long
countChannels()
long
countChannels(java.lang.String channel_glob)
long
countChannels(java.lang.String channel_glob, int channel_type_mask)
long
countChannels(java.lang.String channel_glob, int channel_type_mask, int data_type_mask)
long
countChannels(java.lang.String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate)
long
countChannels(java.lang.String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate, double max_sample_rate)
epoch
currentEpoch()
void
delete()
buffer[]
fetch(int gps_start, int gps_stop, java.lang.String[] channel_names)
protected void
finalize()
channel[]
findChannels()
channel[]
findChannels(java.lang.String channel_glob)
channel[]
findChannels(java.lang.String channel_glob, int channel_type_mask)
channel[]
findChannels(java.lang.String channel_glob, int channel_type_mask, int data_type_mask)
channel[]
findChannels(java.lang.String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate)
channel[]
findChannels(java.lang.String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate, double max_sample_rate)
availability_list_type
getAvailability(java.lang.String[] channel_names)
protected static long
getCPtr(connection obj)
epochs_type
getEpochs()
java.lang.String
getHost()
java.lang.String
getParameter(java.lang.String parameter)
channel_names_type
getParameters()
int
getPort()
int
getProtocol()
SWIGTYPE_p_channel__hash_type
hash()
connection_iterator
iterate(int Start, int Stop, int Stride, java.lang.String[] Channels)
connection_iterator
iterate(int Start, int Stop, java.lang.String[] Channels)
connection_iterator
iterate(int Stride, java.lang.String[] Channels)
connection_iterator
iterate(java.lang.String[] Channels)
protected connection
iterate_base(int gps_start, int gps_stop, int stride, java.lang.String[] channel_names)
protected connection
iterate_base(int gps_start, int gps_stop, java.lang.String[] channel_names)
protected connection
iterate_base(int stride, java.lang.String[] channel_names)
protected connection
iterate_base(java.lang.String[] channel_names)
buffer[]
next()
parameters
parameters()
boolean
requestInProgress()
boolean
setEpoch(int gps_start, int gps_stop)
boolean
setEpoch(java.lang.String epoch)
boolean
setParameter(java.lang.String parameter, java.lang.String value)
void
shutdown()
-
-
-
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 classjava.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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.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()
-
getEpochs
public epochs_type getEpochs()
-
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)
-
getParameters
public channel_names_type getParameters()
-
parameters
public parameters parameters()
-
hash
public SWIGTYPE_p_channel__hash_type hash()
-
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()
-
getAvailability
public availability_list_type getAvailability(java.lang.String[] channel_names)
-
-