Move main to version 6.0
* Upgrade to the latest dependencies * Migrate samples to `jakarta` namespace * Rework `cafe-scripted` to RSocket instead of already removed RMI * Migrate JMS samples to Apache Artemis for Jakarta EE 9 * Disables mails tests since there is a requirement to migrate to Greenmail for Jakarta EE 9 support * Rework `generatePom` task to a new `maven-publish` plugin style
This commit is contained in:
@@ -13,18 +13,22 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.samples.tcpclientserver;
|
||||
|
||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang.builder.ToStringStyle;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* @author Christian Posta
|
||||
* @author Gunnar Hillert
|
||||
*/
|
||||
public class CustomOrder {
|
||||
|
||||
private int number;
|
||||
|
||||
private String sender;
|
||||
|
||||
private String message;
|
||||
|
||||
public CustomOrder(int number, String sender) {
|
||||
@@ -52,4 +56,5 @@ public class CustomOrder {
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,15 +13,17 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.samples.tcpclientserver;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.core.serializer.Deserializer;
|
||||
import org.springframework.core.serializer.Serializer;
|
||||
|
||||
@@ -49,12 +51,14 @@ import org.springframework.core.serializer.Serializer;
|
||||
* @author Christian Posta
|
||||
* @author Gunnar Hillert
|
||||
*/
|
||||
public class CustomSerializerDeserializer implements Serializer<CustomOrder>, Deserializer<CustomOrder>{
|
||||
public class CustomSerializerDeserializer implements Serializer<CustomOrder>, Deserializer<CustomOrder> {
|
||||
|
||||
protected final Log logger = LogFactory.getLog(this.getClass());
|
||||
|
||||
private static final int ORDER_NUMBER_LENGTH = 3;
|
||||
|
||||
private static final int SENDER_NAME_LENGTH = 10;
|
||||
|
||||
private static final int MESSAGE_LENGTH_LENGTH = 6;
|
||||
|
||||
/**
|
||||
@@ -115,7 +119,7 @@ public class CustomSerializerDeserializer implements Serializer<CustomOrder>, De
|
||||
for (int i = 0; i < length; ++i) {
|
||||
c = inputStream.read();
|
||||
checkClosure(c);
|
||||
builder.append((char)c);
|
||||
builder.append((char) c);
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
@@ -145,4 +149,5 @@ public class CustomSerializerDeserializer implements Serializer<CustomOrder>, De
|
||||
throw new IOException("Socket closed during message assembly");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user