|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmuc.jositransport.ClientTSAP
public class ClientTSAP
This class implements a client Transport Service Access Point (TSAP) over TCP/IP as defined in RFC 1006, ISO 8072, and ISO 8073. It can be used to create TConnections that connect to remote ServerTSAPs.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
TConnection |
connectTo(java.net.InetAddress address,
int port)
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 |
setConnectTimeout(int timeout)
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientTSAP()
public ClientTSAP(javax.net.SocketFactory socketFactory)
Method Detail |
---|
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 InetAddressport
- remote port
java.io.IOException
- is thrown if connection was unsuccessful.public void setConnectTimeout(int timeout)
public void setSocketFactory(javax.net.SocketFactory socketFactory)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |