use of org.jpos.util.FSDMsg in project jPOS by jpos.
the class FSDChannel method createMsg.
@Override
public ISOMsg createMsg() {
FSDMsg fsdmsg = new FSDMsg(schema);
fsdmsg.setCharset(charset);
return new FSDISOMsg(fsdmsg);
}
use of org.jpos.util.FSDMsg in project jPOS by jpos.
the class FSDISOMsg method clone.
public Object clone(int[] fields) {
FSDISOMsg m = (FSDISOMsg) super.clone();
m.fsd = new FSDMsg(fsd.getBasePath(), fsd.getBaseSchema());
for (int field : fields) {
String f = Integer.toString(field);
m.fsd.set(f, fsd.get(f));
}
return m;
}
use of org.jpos.util.FSDMsg in project jPOS by jpos.
the class FSDISOMsg method readExternal.
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
// ignore version for now
in.readByte();
String basePath = in.readUTF();
String baseSchema = in.readUTF();
fsd = new FSDMsg(basePath, baseSchema);
Map map = (Map) in.readObject();
Iterator iter = map.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
fsd.set((String) entry.getKey(), (String) entry.getValue());
}
}
use of org.jpos.util.FSDMsg in project jPOS by jpos.
the class FSDChannel method send.
@Override
public void send(ISOMsg m) throws IOException, ISOException {
if (m instanceof FSDISOMsg) {
FSDMsg fsd = ((FSDISOMsg) m).getFSDMsg();
fsd.setCharset(charset);
}
super.send(m);
}