Search in sources :

Example 1 with FSDMsg

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);
}
Also used : FSDISOMsg(org.jpos.iso.FSDISOMsg) FSDMsg(org.jpos.util.FSDMsg)

Example 2 with 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;
}
Also used : FSDMsg(org.jpos.util.FSDMsg)

Example 3 with FSDMsg

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());
    }
}
Also used : Iterator(java.util.Iterator) Map(java.util.Map) FSDMsg(org.jpos.util.FSDMsg)

Example 4 with FSDMsg

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);
}
Also used : FSDISOMsg(org.jpos.iso.FSDISOMsg) FSDMsg(org.jpos.util.FSDMsg)

Aggregations

FSDMsg (org.jpos.util.FSDMsg)4 FSDISOMsg (org.jpos.iso.FSDISOMsg)2 Iterator (java.util.Iterator)1 Map (java.util.Map)1