Use an xml (de)serializer to create Java object instead of parsing them by hand
This commit is contained in:
26
src/com/sheepit/client/datamodel/RequestEndPoint.java
Normal file
26
src/com/sheepit/client/datamodel/RequestEndPoint.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.sheepit.client.datamodel;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import org.simpleframework.xml.Attribute;
|
||||
import org.simpleframework.xml.Root;
|
||||
|
||||
@Root(strict = false, name = "request")
|
||||
@ToString
|
||||
public class RequestEndPoint {
|
||||
|
||||
@Attribute
|
||||
@Getter
|
||||
private String type;
|
||||
|
||||
@Attribute
|
||||
@Getter
|
||||
private String path;
|
||||
|
||||
@Attribute(name = "max-period", required = false)
|
||||
@Getter
|
||||
private int maxPeriod;
|
||||
|
||||
public RequestEndPoint() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user