org.openmuc.jositransport
public final class ClientTSap extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
byte[] |
tSelLocal |
byte[] |
tSelRemote |
Constructor and Description |
---|
ClientTSap()
Use this constructor to create a client TSAP that will start connections to remote TSAPs.
|
ClientTSap(javax.net.SocketFactory socketFactory)
Use this constructor to create a client TSAP that will start connections to remote TSAPs.
|
Modifier and Type | Method and Description |
---|---|
TConnection |
connectTo(java.net.InetAddress address,
int port)
Connect to a remote TSAP that is listening at the destination address.
|
TConnection |
connectTo(java.net.InetAddress address,
int port,
java.net.InetAddress localAddr,
int localPort)
Connect to a remote TSAP that is listening at the destination address.
|
static int |
getMaxTPDUSize(int maxTPDUSizeParam)
Get the maximum TPDUSize.
|
int |
getMaxTPDUSizeParam()
Get the maxTPDUSize Parameter to be used by this TSAP
|
void |
setMaxTPDUSizeParam(int maxTPDUSizeParam)
Set the maxTPDUSize.
|
void |
setMessageFragmentTimeout(int messageFragmentTimeout)
Set the TConnection timeout for receiving data once the beginning of a message has been received.
|
void |
setMessageTimeout(int messageTimeout)
Set the TConnection timeout for waiting for the first byte of a new message.
|
void |
setSocketFactory(javax.net.SocketFactory socketFactory) |
public ClientTSap()
public ClientTSap(javax.net.SocketFactory socketFactory)
public void setMessageTimeout(int messageTimeout)
messageTimeout
- in millisecondspublic void setMessageFragmentTimeout(int messageFragmentTimeout)
messageFragmentTimeout
- in millisecondspublic void setMaxTPDUSizeParam(int maxTPDUSizeParam)
maxTPDUSizeParam
- The maximum length is equal to 2^(maxTPDUSizeParam) octets. Note that the actual TSDU size that can be
transfered is equal to TPDUSize-3. Default is 65531 octets (see RFC 1006), 7 <= maxTPDUSizeParam <=
16, needs to be set before listening or connectingpublic int getMaxTPDUSizeParam()
public static int getMaxTPDUSize(int maxTPDUSizeParam) throws java.io.IOException
maxTPDUSizeParam
- java.io.IOException
public TConnection connectTo(java.net.InetAddress address, int port) throws java.io.IOException
address
- remote IPport
- remote portjava.io.IOException
- is thrown if connection was unsuccessful.public TConnection connectTo(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException
address
- remote IPport
- remote portlocalAddr
- local IPlocalPort
- local portjava.io.IOException
- is thrown if connection was unsuccessful.public void setSocketFactory(javax.net.SocketFactory socketFactory)