2
엔티티 "메시지"에 대한 XML 설명. 필드에서xStream에서 인터페이스 구현을 지정하는 방법은 무엇입니까?
<Message id="11600005" name="some_name">
<sourcePartitionId>11600</sourcePartitionId>
<destPartitionId>11700</destPartitionId>
<payloadId>1300005</payloadId>
<sourceUdp>1045</sourceUdp>
<destUdp>1046</destUdp>
<sourceIp>10.4.48.0</sourceIp>
<destIp>10.4.49.0</destIp>
<sourcePort id="1045" name="sp_q_1045_11600_11700_005">
<type>Queuing</type>
<maxMessageSize>8192</maxMessageSize>
<characteristic>1</characteristic>
</sourcePort>
<destPort id="1046" name="dp_q_1045_1046_11600_11700_005">
<type>Queuing</type>
<maxMessageSize>8192</maxMessageSize>
<characteristic>1</characteristic>
</destPort>
</Message>
sourcePort
destPort
설명과 인터페이스 ComPort
구현 개체 : SamplingPort
및 QueuingPort
: 계면에서
public interface ComPort {
enum PortType {Sampling, Queuing}
enum PortDirection {Rx,Tx}
public PortType getPortType();
public PortDirection getPortDirection();
public int getMaxMessageSize();
public int getPortCharacteristic();
두 개의 구현들이있다. 주요 차이점 - 특성 필드. <type>
태그를 기반으로 xstream을 만드는 방법을 알려주면 해당 구현의 인스턴스가 생성됩니까?
중요한 점 : 그것은 sourcePort
태그 때 고려해야 할 필요가있다 - 방향 필드 Tx
이며, destPort
태그 할 때 - 방향 필드 Rx