Remote Systems
v6.4.1

com.ibm.etools.systems.dstore.core.util
Class Sender

java.lang.Object
  extended bycom.ibm.etools.systems.dstore.core.util.Sender
All Implemented Interfaces:
ISender

public class Sender
extends Object
implements ISender

This class is used for sending data to a socket in the DataStore communication layer.


Field Summary
static String Copyright
           
 
Constructor Summary
Sender(Socket socket, DataStore dataStore)
          Constructor
 
Method Summary
 void sendAppendFile(DataElement objectRoot, byte[] bytes, int size, boolean binary)
          Sends the bytes of a file through the socket to be appended to a file on the other end
 void sendDocument(DataElement objectRoot, int depth)
          Sends a DataStore tree of data through the socket
 void sendDocument(String document)
          Sends a string through the socket
 void sendFile(DataElement objectRoot, byte[] bytes, int size, boolean binary)
          Sends the bytes of a file through the socket
 void sendKeepAliveConfirmation(DataElement document)
           
 void sendKeepAliveRequest(DataElement document)
           
 Socket socket()
          Returns the associated socket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Constructor Detail

Sender

public Sender(Socket socket,
              DataStore dataStore)
Constructor

Parameters:
socket - the associated socket
dataStore - the associated DataStore
Method Detail

socket

public Socket socket()
Returns the associated socket

Returns:
the socket

sendDocument

public void sendDocument(String document)
Sends a string through the socket

Specified by:
sendDocument in interface ISender
Parameters:
document - the string to send

sendFile

public void sendFile(DataElement objectRoot,
                     byte[] bytes,
                     int size,
                     boolean binary)
Sends the bytes of a file through the socket

Parameters:
objectRoot - the object representing the file to send
bytes - the bytes to send over the socket
size - the number of bytes to send over the socket
binary - indicates whether to send the bytes and binary or text

sendAppendFile

public void sendAppendFile(DataElement objectRoot,
                           byte[] bytes,
                           int size,
                           boolean binary)
Sends the bytes of a file through the socket to be appended to a file on the other end

Parameters:
objectRoot - the object representing the file to send
bytes - the bytes to send over the socket
size - the number of bytes to send over the socket
binary - indicates whether to send the bytes and binary or text

sendDocument

public void sendDocument(DataElement objectRoot,
                         int depth)
Sends a DataStore tree of data through the socket

Specified by:
sendDocument in interface ISender
Parameters:
objectRoot - the root of the tree to send
depth - the depth of the tree to send

sendKeepAliveRequest

public void sendKeepAliveRequest(DataElement document)

sendKeepAliveConfirmation

public void sendKeepAliveConfirmation(DataElement document)

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.