Package nds2
Class connection
java.lang.Object
nds2.connection
- All Implemented Interfaces:
Closeable
,AutoCloseable
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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
protected boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
connection
(long cPtr, boolean cMemoryOwn) connection
(String host) connection
(String host, int port) connection
(String host, int port, int protocol) connection
(parameters params) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
close()
long
long
countChannels
(String channel_glob) long
countChannels
(String channel_glob, int channel_type_mask) long
countChannels
(String channel_glob, int channel_type_mask, int data_type_mask) long
countChannels
(String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate) long
countChannels
(String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate, double max_sample_rate) void
delete()
buffer[]
protected void
finalize()
channel[]
channel[]
findChannels
(String channel_glob) channel[]
findChannels
(String channel_glob, int channel_type_mask) channel[]
findChannels
(String channel_glob, int channel_type_mask, int data_type_mask) channel[]
findChannels
(String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate) channel[]
findChannels
(String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate, double max_sample_rate) getAvailability
(String[] channel_names) protected static long
getCPtr
(connection obj) getHost()
getParameter
(String parameter) int
getPort()
int
hash()
protected connection
iterate_base
(int gps_start, int gps_stop, int stride, String[] channel_names) protected connection
iterate_base
(int gps_start, int gps_stop, String[] channel_names) protected connection
iterate_base
(int stride, String[] channel_names) protected connection
iterate_base
(String[] channel_names) buffer[]
next()
boolean
boolean
setEpoch
(int gps_start, int gps_stop) boolean
boolean
setParameter
(String parameter, String value) void
shutdown()
protected static long
swigRelease
(connection obj)
-
Field Details
-
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 Details
-
connection
protected connection(long cPtr, boolean cMemoryOwn) -
connection
-
connection
-
connection
-
connection
-
connection
public connection()
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize() -
delete
public void delete() -
iterate
- Throws:
UnsupportedOperationException
-
iterate
public connection_iterator iterate(int Stride, String[] Channels) throws UnsupportedOperationException - Throws:
UnsupportedOperationException
-
iterate
public connection_iterator iterate(int Start, int Stop, String[] Channels) throws UnsupportedOperationException - Throws:
UnsupportedOperationException
-
iterate
public connection_iterator iterate(int Start, int Stop, int Stride, String[] Channels) throws UnsupportedOperationException - Throws:
UnsupportedOperationException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
countChannels
public long countChannels(String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate, double max_sample_rate) -
countChannels
public long countChannels(String channel_glob, int channel_type_mask, int data_type_mask, double min_sample_rate) -
countChannels
-
countChannels
-
countChannels
-
countChannels
public long countChannels() -
findChannels
-
findChannels
-
findChannels
-
findChannels
-
findChannels
-
findChannels
-
getEpochs
-
setEpoch
-
setEpoch
public boolean setEpoch(int gps_start, int gps_stop) -
currentEpoch
-
check
-
fetch
-
getHost
-
getPort
public int getPort() -
getProtocol
public int getProtocol() -
setParameter
-
getParameter
-
getParameters
-
parameters
-
hash
-
iterate_base
-
iterate_base
-
iterate_base
-
iterate_base
-
next
-
requestInProgress
public boolean requestInProgress() -
shutdown
public void shutdown() -
getAvailability
-