public class RemoteUDPClient extends PhysicalDataSource
Modifier and Type | Class and Description |
---|---|
static class |
RemoteUDPClient.ClientAlarm
Thread class to control how long packet receiving has to be done.
|
static class |
RemoteUDPClient.ClientStarter
Thread class to start the Client.
|
static class |
RemoteUDPClient.InterPacketDelay
Interpacket delay parameter setter.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
bounds |
static int |
buffer_size |
static java.net.Socket |
clientAlarmSocket |
static int |
clientControlPort |
static int |
clientDataPort |
static java.net.Socket |
clientSocket |
static java.net.Socket |
connectionSocket |
static java.net.DatagramSocket |
ds |
static byte[] |
dstByteArray |
static long |
end |
static java.lang.String |
fileName |
static int |
fileSize |
static int |
globalVal |
static java.net.InetAddress |
ip |
static int[] |
lostPacketArray |
static int |
lostPacketCounter |
static int[] |
lower |
static java.lang.String |
missedPacket |
static int |
number_packets |
static int |
packetSize |
static int |
rempart |
static int |
serverAlarmPort |
static int |
serverControlPort |
static int |
serverDataPort |
static long |
start |
static int |
statusFlag |
static int |
times |
static int[] |
upper |
static java.net.ServerSocket |
welcomeSocket |
BIG_ENDIAN, bufferBounds, bufferDimension, bufferSteps, byteBuffers, directMemoryLimit, endian, LITTLE_ENDIAN, maxBufferSize, maxGapSize, readCounter, readLength, url
fdlDescriptor, isActivated, name, wsName
attributeOrder, axisOrdering, axisWeights, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc
Constructor and Description |
---|
RemoteUDPClient(java.lang.String name,
RecordDescriptor recordDesc,
ISBounds theBounds,
AxisOrdering ordering,
java.lang.String URL,
java.lang.String serverURL)
RemoteUDPClient class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Open the server socket on the client side.
|
static void |
AlarmThreadStart()
Method for restarting Alarm thread with different sleepTime quantum.
|
void |
buildBounds(ISBounds srcBounds)
Builds the bounds string to be sent to the RemoteUDPServer.
|
static void |
ClientToServerControlInfo(java.lang.String s)
TCP Control Traffic to Server about missing packets.
|
static void |
closeWelcomeSocket()
Close welcomeSocket for Control Information.
|
void |
datum(Datum datum,
IndexSpaceID did)
Get the Datum and fill its values in the passed Datum at positions
specified by the corresponding IndexSpaceID coordinates.
|
void |
datum(Datum datum,
IndexSpaceID did,
FieldIDMapper mp)
Get the Datum and fill its values in the passed Datum at positions
specified by the corresponding FieldIDMapper.
|
void |
datum(Datum datum,
IndexSpaceID did,
RecordSpec recSpec)
Get the Datum and fill its values in the passed Datum at positions
specified by the corresponding RecordSpec.
|
Datum |
datum(IndexSpaceID did)
Return the Datum corresponding to the given IndexSpaceID.
|
Datum |
datum(IndexSpaceID did,
RecordSpec spec)
Return the Datum corresponding to the given IndexSpaceID.
|
void |
deactivate()
Close the server socket on the client side.
|
static void |
getSocketRef(java.net.ServerSocket s)
Method to provide a reference to the welcomeSocket on client.
|
static void |
main(java.lang.String[] args)
RemoteUDPClient main.
|
static void |
openWelcomeSocket()
Open welcomeSocket for Control Information.
|
static void |
PacketRetransmission(java.lang.String s)
Logic to receive packet retransmissions.
|
protected void |
pdatumUDP(Datum datum,
IndexSpaceID did)
this method will extract data from datasource on remote server using UFTP logic.
|
protected void |
psubblockUDP(BasicBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds)
this method will extract data from datasource on remote server using UFTP logic.
|
static int |
Seqnum_Decoder(byte[] a)
Finds the integer value of 32 bit binary string.
|
static void |
ServerToClientAlarm()
Server to Client Alarm Information reader.
|
static void |
ServerToClientControlInfo()
Server to Client Control Information regarding
file size & packet size.
|
static void |
setBasicBlockBounds(java.lang.String s)
Method to tell server the bounds for basic block construction.
|
static void |
setFileName(java.lang.String s)
Sets the filename for transfer.
|
void |
setRemoteDataSource(java.lang.String xmlFile,
java.lang.String dsName)
set the xml file for the remote datasource.
|
protected void |
subBasicBlock(BasicBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds)
Note: The BasicBlock is assumed to be created and a valid data
array is already allocated.
|
void |
subblock(DataBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds)
Reads a subblock defined by srcBounds into the region of the Datablock argument
defined by dstBounds.
|
void |
subblock(DataBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds,
FieldIDMapper mp)
Reads a subblock defined by srcBounds into the region of the Datablock argument
defined by dstBounds.
|
void |
subblock(DataBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds,
RecordSpec recSpec)
Reads a subblock defined by srcBounds into the region of the Datablock argument
defined by dstBounds.
|
DataBlock |
subblock(ISBounds db)
Returns a spatial subset of the DataSource as delimited by the ISBounds argument.
|
static void |
TheClient()
File transfer client program.
|
long |
transmitTime() |
allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, deleteBuffer, deleteBuffer, deleteBuffers, equals, getBuffer, getBuffer, getBufferSize, getBufferSize, getByteOrder, getDataFileString, getMaxBufferSize, getReadCounter, getReadLength, getURL, initializeBuffers, isBigEndian, makeBestBuffer, resetReadCounter, setBufferByteOrder, setByteOrder, setMaxBufferSize, setMaxGapSize, toString, toString
checkActivated, clearCache, copyBestID, create, create, create, createRemote, createRemote, createRemoteClient, createRemoteClient, createRemoteDataSource, createRemoteDataSource, createRemoteDataSourceUDP, createRemoteUDP, createRemoteUDP, dumpData, getFDLDescriptor, getMetadataCollection, getName, getStatistics, getValues, isActivated, setMetadataCollection
byteSize, computeOffset, computeOffset, copyBounds, createDataBlock, createDataBlock, createDataBlock, createDatum, createDatum, createDatum, createDatum, createDatum, createDatum, datum, datum, dim, getAttributeNames, getAxisOrdering, getAxisWeight, getAxisWeights, getBounds, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytesByAttribute, getBytesByAttribute, getBytesByPoint, getBytesByPoint, getDataOrder, getDimensionsArray, getDouble, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoublesByAttribute, getDoublesByAttribute, getDoublesByPoint, getDoublesByPoint, getFloat, getFloats, getFloats, getFloats, getFloats, getFloats, getFloats, getFloatsByAttribute, getFloatsByAttribute, getFloatsByPoint, getFloatsByPoint, getInt, getInts, getInts, getInts, getInts, getInts, getInts, getIntsByAttribute, getIntsByAttribute, getIntsByPoint, getIntsByPoint, getLowerBoundsArray, getNumAttributes, getRecordDescriptor, getShort, getShorts, getShorts, getShorts, getShorts, getShorts, getShorts, getShortsByAttribute, getShortsByAttribute, getShortsByPoint, getShortsByPoint, getStorageType, getUpperBoundsArray, getValues, getValuesByAttribute, getValuesByPoint, longVolume, setAxisOrdering, setBounds, setRecordDescriptor, size, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, useBytesOnly, volume
public static int serverDataPort
public static int serverControlPort
public static int serverAlarmPort
public static int clientDataPort
public static int clientControlPort
public static java.net.ServerSocket welcomeSocket
public static java.net.Socket connectionSocket
public static java.net.Socket clientSocket
public static java.net.Socket clientAlarmSocket
public static java.net.DatagramSocket ds
public static java.net.InetAddress ip
public static java.lang.String fileName
public static int fileSize
public static int buffer_size
public static int packetSize
public static int times
public static int rempart
public static int number_packets
public static int[] lostPacketArray
public static int lostPacketCounter
public static java.lang.String missedPacket
public static int globalVal
public static long start
public static long end
public static int statusFlag
public static byte[] dstByteArray
public static int[] lower
public static int[] upper
public static java.lang.String bounds
public RemoteUDPClient(java.lang.String name, RecordDescriptor recordDesc, ISBounds theBounds, AxisOrdering ordering, java.lang.String URL, java.lang.String serverURL)
public static void setFileName(java.lang.String s)
public void activate()
activate
in class DataSource
public static void openWelcomeSocket() throws java.lang.Exception
java.lang.Exception
public static void closeWelcomeSocket() throws java.lang.Exception
java.lang.Exception
public void deactivate()
deactivate
in class PhysicalDataSource
public static void getSocketRef(java.net.ServerSocket s)
public static void setBasicBlockBounds(java.lang.String s) throws java.lang.Exception
java.lang.Exception
public void setRemoteDataSource(java.lang.String xmlFile, java.lang.String dsName)
public Datum datum(IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum datum, IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum datum, IndexSpaceID did, RecordSpec recSpec)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum datum, IndexSpaceID did, FieldIDMapper mp)
datum
in interface Indexable
datum
in class DataCollection
public Datum datum(IndexSpaceID did, RecordSpec spec)
datum
in interface Indexable
datum
in class DataCollection
protected void pdatumUDP(Datum datum, IndexSpaceID did)
public void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper mp)
subblock
in interface Indexable
subblock
in class PhysicalDataSource
public void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds, RecordSpec recSpec)
subblock
in interface Indexable
subblock
in class PhysicalDataSource
public void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds)
subblock
in interface Indexable
subblock
in class PhysicalDataSource
protected void subBasicBlock(BasicBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds)
protected void psubblockUDP(BasicBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds) throws java.lang.Exception
java.lang.Exception
public void buildBounds(ISBounds srcBounds)
public long transmitTime()
public DataBlock subblock(ISBounds db)
subblock
in interface Indexable
subblock
in class DataCollection
public static void TheClient()
public static void PacketRetransmission(java.lang.String s)
public static void ServerToClientControlInfo() throws java.lang.Exception
java.lang.Exception
public static void ClientToServerControlInfo(java.lang.String s) throws java.lang.Exception
java.lang.Exception
public static void ServerToClientAlarm() throws java.lang.Exception
java.lang.Exception
public static int Seqnum_Decoder(byte[] a)
public static void AlarmThreadStart()
public static void main(java.lang.String[] args)