|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.allegato.SocketConfig
public class SocketConfig
Encapsulates the configuration of a client socket connection. The class provides access to all socket parameters specified in a XML element or set using the set methods.
The class also provides a method to establish the client socket connection.
Constructor Summary | |
---|---|
SocketConfig()
Default constructor |
|
SocketConfig(java.lang.String name,
XMLProperties xmlProps)
Initialises this socket configuration object with the given XML configuration data. |
Method Summary | |
---|---|
java.net.Socket |
createSocket()
Create and return a Socket instance using the configuration properties of this configuration object. |
java.lang.Integer |
getConnectTimeout()
Return the ConnectTimeout property. |
java.lang.String |
getHost()
Return the host name property. |
java.lang.Integer |
getPort()
Return the port property. |
java.lang.Boolean |
getSOKeepAlive()
Return the SOKeepAlive property. |
java.lang.Integer |
getSOLinger()
Return the SOLinger property. |
java.lang.Integer |
getSOReceiveBufSize()
Return the SOReceiveBufSize property. |
java.lang.Integer |
getSOSendBufSize()
Return the SOSendBufSize property. |
java.lang.Integer |
getSOTimeout()
Return the SOTimeout property. |
java.lang.Boolean |
getTCPNoDelay()
Return the TCPNoDelay property. |
void |
setConnectTimeout(java.lang.Integer connectTimeout)
Set the ConnectTimeout property. |
void |
setHost(java.lang.String host)
Set the host name property. |
void |
setPort(java.lang.Integer port)
Set the port property. |
void |
setSOKeepAlive(java.lang.Boolean soKeepAlive)
Set the SOKeepAlive property. |
void |
setSOLinger(java.lang.Integer soLinger)
Set the SOLinger property. |
void |
setSOReceiveBufSize(java.lang.Integer soReceiveBufSize)
Set the SOReceiveBufSize property. |
void |
setSOSendBufSize(java.lang.Integer soSendBufSize)
Set the SOSendBufSize property. |
void |
setSOTimeout(java.lang.Integer soTimeout)
Set the SOTimeout property. |
void |
setTCPNoDelay(java.lang.Boolean tcpNoDelay)
Set the TCPNoDelay property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SocketConfig()
public SocketConfig(java.lang.String name, XMLProperties xmlProps) throws ConfException
name
- String containing the name of the SocketConfig
configuration element.xmlProps
- XML coinfiguration properties containing a valid
SocketConfig element.
ConfException
- if this config object cannot be initialised.Method Detail |
---|
public void setHost(java.lang.String host)
host
- String containing the host name property.public java.lang.String getHost()
public void setPort(java.lang.Integer port)
port
- Integer containing the port property.public java.lang.Integer getPort()
public void setSOLinger(java.lang.Integer soLinger)
soLinger
- Integer containing the SOLinger property.public java.lang.Integer getSOLinger()
public void setSOReceiveBufSize(java.lang.Integer soReceiveBufSize)
soReceiveBufSize
- Integer containing the SOReceiveBufSize property.public java.lang.Integer getSOReceiveBufSize()
public void setSOSendBufSize(java.lang.Integer soSendBufSize)
soSendBufSize
- Integer containing the SOSendBufSize property.public java.lang.Integer getSOSendBufSize()
public void setSOTimeout(java.lang.Integer soTimeout)
soTimeout
- Integer containing the SOTimeout property.public java.lang.Integer getSOTimeout()
public void setSOKeepAlive(java.lang.Boolean soKeepAlive)
soKeepAlive
- Boolean containing the SOKeepAlive property.public java.lang.Boolean getSOKeepAlive()
public void setConnectTimeout(java.lang.Integer connectTimeout)
connectTimeout
- Integer containing the ConnectTimeout property.public java.lang.Integer getConnectTimeout()
public void setTCPNoDelay(java.lang.Boolean tcpNoDelay)
tcpNoDelay
- Boolean containing the TCPNoDelay property.public java.lang.Boolean getTCPNoDelay()
public java.net.Socket createSocket() throws java.io.IOException
IOExcption
- if the socket connection cannot be established.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |