com.tivoli.twg.netipc
Class TWGDatagramSocket

java.lang.Object
  extended bycom.tivoli.twg.netipc.TWGDatagramSocket
Direct Known Subclasses:
TWGUDPSocket

public abstract class TWGDatagramSocket
extends java.lang.Object


Field Summary
protected  int data_ack_timeout
           
protected static int DATA_ACK_TIMEOUT
           
protected  int data_recv_timeout
           
protected static int DATA_RECV_TIMEOUT
           
protected  int default_window_size
           
protected static int DEFAULT_WINDOW_SIZE
           
protected static int ENCRYPTION_OVERHEAD
           
protected  boolean is_reliable
           
protected static boolean IS_RELIABLE
           
protected  int max_data_retries
           
protected static int MAX_DATA_RETRIES
           
protected  int max_datagram_size
           
protected static int MAX_DATAGRAM_SIZE
           
protected  int max_recv_ack_retries
           
protected static int MAX_RECV_ACK_RETRIES
           
protected  int max_send_ack_retries
           
protected static int MAX_SEND_ACK_RETRIES
           
protected  int max_send_init_retries
           
protected static int MAX_SEND_INIT_RETRIES
           
protected  int max_xfer_wait_time
           
protected static int MAX_XFER_WAIT_TIME
           
protected  java.lang.String protocol_name
           
protected  int recv_ack_timeout
           
protected static int RECV_ACK_TIMEOUT
           
protected  int send_done_timeout
           
protected static int SEND_DONE_TIMEOUT
           
protected  int send_init_timeout
           
protected static int SEND_INIT_TIMEOUT
           
protected  int simple_send_timeout
           
protected static int SIMPLE_SEND_TIMEOUT
           
 
Constructor Summary
TWGDatagramSocket()
          Default constructor
 
Method Summary
abstract  void BroadcastDatagram(byte[] b, int len)
          Broadcast datagram over socket
 void BroadcastDatagramOnDiscardPort(byte[] b, int len)
          Broadcast datagram to discard port over socket (new in v3.10)
abstract  void Close()
          Terminate this datagram socket provider
 int GetDataAckTimeout()
          Get data ack timeout
 int GetDataRecvTimeout()
          Get data receive timeout
 int GetDefaultWindowSize()
          Get default window size
abstract  java.lang.String GetDriverName()
          Get descriptive name for this datagram transport provider (e.g., "UDP")
 int GetMaxDatagramSize()
          Get maximum datagram size supported (receive)
 int GetMaxDataRetries()
          Get maximum data retries
 int GetMaxRecvAckRetries()
          Get maximum receive ack retries
 int GetMaxSendAckRetries()
          Get maximum send ack retries
 int GetMaxSendDatagramSize()
          Get maximum datagram size supported (send)
 int GetMaxSendInitRetries()
          Get maximum send init retries
 int GetMaxXferWaitTime()
          Get maximum transfer wait time
abstract  TWGNetAddress GetNetAddress(java.lang.String address_name)
          Get network transport address for name
 java.lang.String getProtocolName()
          Get protocol name used in IPC paths
 int GetRecvAckTimeout()
          Get receive ack timeout
 int GetSendDoneTimeout()
          Get send done timeout
 int GetSendInitTimeout()
          Get send init timeout
 int GetSimpleSendTimeout()
          Get simple send timeout
 boolean IsReliable()
          Get whether provider is reliable (or requires acked transfers)
abstract  java.lang.String NormalizeAddressName(java.lang.String name)
          Normalize address name (e.g., resolve TCP/IP host name to dotted decimal string)
abstract  TWGReceivedDatagram ReceiveDatagram()
          Receive datagram from socket - must be blocking
abstract  void SendDatagram(TWGNetAddress target_addr, byte[] b, int len)
          Send datagram over socket - must be non-blocking
abstract  void SendDatagram(TWGNetAddress target_addr, byte[] b, int off, int len)
          Send datagram over socket - must be non-blocking
 void Start(java.lang.String protocol_name, java.lang.String init_string)
          Initialize this datagram socket provider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DATAGRAM_SIZE

protected static final int MAX_DATAGRAM_SIZE
See Also:
Constant Field Values

ENCRYPTION_OVERHEAD

protected static final int ENCRYPTION_OVERHEAD
See Also:
Constant Field Values

DEFAULT_WINDOW_SIZE

protected static final int DEFAULT_WINDOW_SIZE
See Also:
Constant Field Values

MAX_DATA_RETRIES

protected static final int MAX_DATA_RETRIES
See Also:
Constant Field Values

MAX_SEND_ACK_RETRIES

protected static final int MAX_SEND_ACK_RETRIES
See Also:
Constant Field Values

MAX_RECV_ACK_RETRIES

protected static final int MAX_RECV_ACK_RETRIES
See Also:
Constant Field Values

MAX_SEND_INIT_RETRIES

protected static final int MAX_SEND_INIT_RETRIES
See Also:
Constant Field Values

SEND_INIT_TIMEOUT

protected static final int SEND_INIT_TIMEOUT
See Also:
Constant Field Values

SIMPLE_SEND_TIMEOUT

protected static final int SIMPLE_SEND_TIMEOUT
See Also:
Constant Field Values

DATA_ACK_TIMEOUT

protected static final int DATA_ACK_TIMEOUT
See Also:
Constant Field Values

DATA_RECV_TIMEOUT

protected static final int DATA_RECV_TIMEOUT
See Also:
Constant Field Values

RECV_ACK_TIMEOUT

protected static final int RECV_ACK_TIMEOUT
See Also:
Constant Field Values

SEND_DONE_TIMEOUT

protected static final int SEND_DONE_TIMEOUT
See Also:
Constant Field Values

MAX_XFER_WAIT_TIME

protected static final int MAX_XFER_WAIT_TIME
See Also:
Constant Field Values

IS_RELIABLE

protected static final boolean IS_RELIABLE
See Also:
Constant Field Values

max_datagram_size

protected int max_datagram_size

default_window_size

protected int default_window_size

max_data_retries

protected int max_data_retries

max_send_ack_retries

protected int max_send_ack_retries

max_recv_ack_retries

protected int max_recv_ack_retries

max_send_init_retries

protected int max_send_init_retries

send_init_timeout

protected int send_init_timeout

simple_send_timeout

protected int simple_send_timeout

data_ack_timeout

protected int data_ack_timeout

data_recv_timeout

protected int data_recv_timeout

recv_ack_timeout

protected int recv_ack_timeout

send_done_timeout

protected int send_done_timeout

max_xfer_wait_time

protected int max_xfer_wait_time

is_reliable

protected boolean is_reliable

protocol_name

protected java.lang.String protocol_name
Constructor Detail

TWGDatagramSocket

public TWGDatagramSocket()
Default constructor

Method Detail

Start

public void Start(java.lang.String protocol_name,
                  java.lang.String init_string)
           throws java.net.SocketException,
                  TWGIPCTransportException
Initialize this datagram socket provider

Parameters:
protocol_name - unique name used in IPC paths (e.g., "TCPIP")
init_string - initialization string to specify protocol-specific parameters
Throws:
java.net.SocketException
TWGIPCTransportException

getProtocolName

public java.lang.String getProtocolName()
Get protocol name used in IPC paths

Returns:
name of protocol

SendDatagram

public abstract void SendDatagram(TWGNetAddress target_addr,
                                  byte[] b,
                                  int off,
                                  int len)
                           throws java.io.IOException
Send datagram over socket - must be non-blocking

Parameters:
target_addr - - target address
b - - source buffer
off - - index of first byte to write from buffer
len - - number of bytes to write from buffer
Throws:
java.io.IOException - - if error during write operation
See Also:
TWGNetAddress

SendDatagram

public abstract void SendDatagram(TWGNetAddress target_addr,
                                  byte[] b,
                                  int len)
                           throws java.io.IOException
Send datagram over socket - must be non-blocking

Parameters:
target_addr - - target address
b - - source buffer
len - - number of bytes to write from buffer
Throws:
java.io.IOException - - if error during write operation
See Also:
TWGNetAddress

BroadcastDatagram

public abstract void BroadcastDatagram(byte[] b,
                                       int len)
                                throws java.io.IOException
Broadcast datagram over socket

Parameters:
b - - source buffer
len - - number of bytes to write from buffer
Throws:
java.io.IOException - - if error during write operation

BroadcastDatagramOnDiscardPort

public void BroadcastDatagramOnDiscardPort(byte[] b,
                                           int len)
                                    throws java.io.IOException
Broadcast datagram to discard port over socket (new in v3.10)

Parameters:
b - - source buffer
len - - number of bytes to write from buffer
Throws:
java.io.IOException - - if error during write operation

ReceiveDatagram

public abstract TWGReceivedDatagram ReceiveDatagram()
                                             throws java.io.IOException
Receive datagram from socket - must be blocking

Returns:
a TWGReceivedDatagram
Throws:
java.io.IOException - - if error during read operation
See Also:
TWGReceivedDatagram

Close

public abstract void Close()
                    throws java.io.IOException
Terminate this datagram socket provider

Throws:
java.io.IOException - - if error during termination

GetDriverName

public abstract java.lang.String GetDriverName()
Get descriptive name for this datagram transport provider (e.g., "UDP")

Returns:
description of this driver

GetNetAddress

public abstract TWGNetAddress GetNetAddress(java.lang.String address_name)
                                     throws TWGNetAddressException
Get network transport address for name

Parameters:
address_name - normalized address name
Returns:
network transport address
Throws:
TWGNetAddressException - if failed to resolve name to address

NormalizeAddressName

public abstract java.lang.String NormalizeAddressName(java.lang.String name)
                                               throws TWGNetAddressException
Normalize address name (e.g., resolve TCP/IP host name to dotted decimal string)

Parameters:
name - address name to normalize
Returns:
normalized address name
Throws:
TWGNetAddressException - if failed to normalize name

GetMaxDatagramSize

public int GetMaxDatagramSize()
Get maximum datagram size supported (receive)

Returns:
maximum datagram size supported

GetMaxSendDatagramSize

public int GetMaxSendDatagramSize()
Get maximum datagram size supported (send)

Returns:
maximum datagram size supported

GetDefaultWindowSize

public int GetDefaultWindowSize()
Get default window size

Returns:
default window size

GetMaxDataRetries

public int GetMaxDataRetries()
Get maximum data retries

Returns:
maximum data retries

GetMaxSendAckRetries

public int GetMaxSendAckRetries()
Get maximum send ack retries

Returns:
maximum send ack retries

GetMaxRecvAckRetries

public int GetMaxRecvAckRetries()
Get maximum receive ack retries

Returns:
maximum receive ack retries

GetMaxSendInitRetries

public int GetMaxSendInitRetries()
Get maximum send init retries

Returns:
maximum send init retries

GetSendInitTimeout

public int GetSendInitTimeout()
Get send init timeout

Returns:
send init timeout

GetSimpleSendTimeout

public int GetSimpleSendTimeout()
Get simple send timeout

Returns:
simple send timeout

GetDataAckTimeout

public int GetDataAckTimeout()
Get data ack timeout

Returns:
data ack timeout

GetDataRecvTimeout

public int GetDataRecvTimeout()
Get data receive timeout

Returns:
data receive timeout

GetRecvAckTimeout

public int GetRecvAckTimeout()
Get receive ack timeout

Returns:
receive ack timeout

GetSendDoneTimeout

public int GetSendDoneTimeout()
Get send done timeout

Returns:
send done timeout

GetMaxXferWaitTime

public int GetMaxXferWaitTime()
Get maximum transfer wait time

Returns:
maximum transfer wait time

IsReliable

public boolean IsReliable()
Get whether provider is reliable (or requires acked transfers)

Returns:
true if reliable transport is provided, otherwise false