Examples of ClassConfigurator


Examples of org.jgroups.conf.ClassConfigurator

        addr.readFrom(in);
        return addr;
    }

    private static void writeOtherAddress(Address addr, DataOutputStream out) throws IOException {
        ClassConfigurator conf=null;
        try {conf=ClassConfigurator.getInstance(false);} catch(Exception e) {}
        int magic_number=conf != null? conf.getMagicNumber(addr.getClass()) : -1;

        // write the class info
        if(magic_number == -1) {
            out.write(0);
            out.writeUTF(addr.getClass().getName());
View Full Code Here

Examples of org.jgroups.conf.ClassConfigurator

        }
        return addr;
    }

    private static Address readOtherAddress(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException {
        ClassConfigurator conf;
        try {
            conf=ClassConfigurator.getInstance(false);
        }
        catch(ChannelException e) {
            IllegalAccessException new_ex=new IllegalAccessException();
            new_ex.initCause(e);
            throw new_ex;
        }
        int b=in.read();
        short magic_number;
        String classname;
        Class cl=null;
        Address addr;
        if(b == 1) {
            magic_number=in.readShort();
            cl=conf.get(magic_number);
        }
        else {
            classname=in.readUTF();
            cl=conf.get(classname);
        }
        addr=(Address)cl.newInstance();
        addr.readFrom(in);
        return addr;
    }
View Full Code Here

Examples of org.jgroups.conf.ClassConfigurator

        addr.readFrom(in);
        return addr;
    }

    private static void writeOtherAddress(Address addr, DataOutputStream out) throws IOException {
        ClassConfigurator conf=null;
        try {
            conf=ClassConfigurator.getInstance(false);
        }
        catch(ChannelException e) {
            IOException new_ex=new IOException();
            new_ex.initCause(e);
            throw new_ex;
        }
        short magic_number=conf != null? conf.getMagicNumber(addr.getClass()) : -1;

        // write the class info
        if(magic_number == -1) {
            out.write(0);
            out.writeUTF(addr.getClass().getName());
View Full Code Here

Examples of org.jgroups.conf.ClassConfigurator

        }
        return addr;
    }

    private static Address readOtherAddress(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException {
        ClassConfigurator conf;
        try {
            conf=ClassConfigurator.getInstance(false);
        }
        catch(ChannelException e) {
            IllegalAccessException new_ex=new IllegalAccessException();
            new_ex.initCause(e);
            throw new_ex;
        }
        int b=in.read();
        short magic_number;
        String classname;
        Class cl=null;
        Address addr;
        if(b == 1) {
            magic_number=in.readShort();
            cl=conf.get(magic_number);
        }
        else {
            classname=in.readUTF();
            cl=conf.get(classname);
        }
        addr=(Address)cl.newInstance();
        addr.readFrom(in);
        return addr;
    }
View Full Code Here

Examples of org.jgroups.conf.ClassConfigurator

        addr.readFrom(in);
        return addr;
    }

    private static void writeOtherAddress(Address addr, DataOutputStream out) throws IOException {
        ClassConfigurator conf=null;
        try {
            conf=ClassConfigurator.getInstance(false);
        }
        catch(ChannelException e) {
            IOException new_ex=new IOException();
            new_ex.initCause(e);
            throw new_ex;
        }
        short magic_number=conf != null? conf.getMagicNumber(addr.getClass()) : -1;

        // write the class info
        if(magic_number == -1) {
            out.write(0);
            out.writeUTF(addr.getClass().getName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.