INT-781 More namespace work (Still W.i.P)
This commit is contained in:
@@ -85,6 +85,8 @@ public abstract class IpAdapterParserUtils {
|
||||
static final String SO_TCP_NODELAY = "so-tcp-nodelay";
|
||||
|
||||
static final String SO_TRAFFIC_CLASS = "so-traffic-class";
|
||||
|
||||
static final String BLOCKING_WRITE = "blocking-write";
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -137,6 +137,8 @@ public class IpOutboundChannelAdapterParser extends AbstractOutboundChannelAdapt
|
||||
builder.addPropertyValue(
|
||||
Conventions.attributeNameToPropertyName(IpAdapterParserUtils.MESSAGE_FORMAT),
|
||||
IpAdapterParserUtils.getMessageFormat(element));
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element,
|
||||
IpAdapterParserUtils.BLOCKING_WRITE);
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element,
|
||||
IpAdapterParserUtils.CUSTOM_SOCKET_WRITER_CLASS_NAME);
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element,
|
||||
|
||||
@@ -140,7 +140,8 @@ public class NetSocketReader extends AbstractSocketReader {
|
||||
len = socket.getInputStream().read(buffer, lengthRead,
|
||||
needed - lengthRead);
|
||||
if (len < 0) {
|
||||
throw new IOException("EOF");
|
||||
logger.debug("Socket closed");
|
||||
throw new IOException("Socket Closed");
|
||||
}
|
||||
lengthRead += len;
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
@@ -264,6 +264,10 @@ public class NioSocketReader extends AbstractSocketReader {
|
||||
if (len == 0) {
|
||||
return false;
|
||||
}
|
||||
if (len < 0) {
|
||||
logger.debug("Socket closed");
|
||||
throw new IOException("Socket closed");
|
||||
}
|
||||
rawBuffer.flip();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Read " + rawBuffer.limit() + " into raw buffer");
|
||||
@@ -307,14 +311,14 @@ public class NioSocketReader extends AbstractSocketReader {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the useDirectBuffers
|
||||
* @return the usingeDirectBuffers
|
||||
*/
|
||||
public boolean isUsingDirectBuffers() {
|
||||
return usingDirectBuffers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param useDirectBuffers the useDirectBuffers to set
|
||||
* @param usingDirectBuffers the usingDirectBuffers to set
|
||||
*/
|
||||
public void setUsingDirectBuffers(boolean usingDirectBuffers) {
|
||||
this.usingDirectBuffers = usingDirectBuffers;
|
||||
|
||||
@@ -76,7 +76,7 @@ public class TcpNetSendingMessageHandler extends
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setCustomSocketWriteriClassName(
|
||||
public void setCustomSocketWriterClassName(
|
||||
String customSocketWriterClassName) throws ClassNotFoundException {
|
||||
this.customSocketWriter = (Class<NetSocketWriter>) Class
|
||||
.forName(customSocketWriterClassName);
|
||||
|
||||
@@ -70,7 +70,7 @@ the custom message format. See java docs for TcpNetReceivingChannelAdapter and T
|
||||
<xsd:attribute name="so-linger" type="xsd:string" />
|
||||
<xsd:attribute name="so-tcp-nodelay" type="xsd:boolean" />
|
||||
<xsd:attribute name="so-traffic-class" type="xsd:string" />
|
||||
<xsd:attribute name="blocking-write" type="xsd:boolean" />
|
||||
<xsd:attribute name="blocking-write" type="xsd:boolean" default="false" />
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
Reference in New Issue
Block a user