Examples of SRCPLocomotive


Examples of de.dermoba.srcp.model.locomotives.SRCPLocomotive

                        PreferencesKeys.LOCK_DURATION));

        locomotiveControl.removeLocomotiveChangeListener(this, this);
        for (Locomotive locomotive : persistence.getAllLocomotives()) {
            LocomotiveType type = locomotive.getLocomotiveType();
            SRCPLocomotive sLocomotive = null;
            if (type.getTypeName().equals("DELTA")) {
                sLocomotive = new MMDeltaLocomotive();
            } else if (type.getTypeName().equals("DIGITAL")) {
                sLocomotive = new MMDigitalLocomotive();
            }
            sLocomotive.setBus(locomotive.getBus());
            sLocomotive.setAddress(locomotive.getAddress());

            locomotiveSRCPLocomotiveMap.put(locomotive, sLocomotive);
            SRCPLocomotiveLocomotiveMap.put(sLocomotive, locomotive);
        }
        locomotiveControl.addLocomotiveChangeListener(this, this);
View Full Code Here

Examples of de.dermoba.srcp.model.locomotives.SRCPLocomotive

    public void setSession(SRCPSession session) {
        locomotiveControl.setSession(session);
    }

    public boolean acquireLock(Locomotive locomotive) throws LockingException {
        SRCPLocomotive sLocomotive = locomotiveSRCPLocomotiveMap
                .get(locomotive);
        try {
            return locomotiveControl.acquireLock(sLocomotive);
        } catch (SRCPLockingException e) {
            throw new LockingException("Locomotive Locked", e);
View Full Code Here

Examples of de.dermoba.srcp.model.locomotives.SRCPLocomotive

            throw new LockingException("Locomotive Error", e);
        }
    }

    public boolean isLocked(Locomotive locomotive) throws LockingException {
        SRCPLocomotive sLocomotive = locomotiveSRCPLocomotiveMap
                .get(locomotive);
        if (locomotiveControl.getSession() == null) {
            return false;
        }
        try {
View Full Code Here

Examples of de.dermoba.srcp.model.locomotives.SRCPLocomotive

            throw new LockingException("Locomotive Error", e);
        }
    }

    public boolean isLockedByMe(Locomotive locomotive) throws LockingException {
        SRCPLocomotive sLocomotive = locomotiveSRCPLocomotiveMap
                .get(locomotive);
        if (locomotiveControl.getSession() == null) {
            return false;
        }
        try {
View Full Code Here

Examples of de.dermoba.srcp.model.locomotives.SRCPLocomotive

            throw new LockingException("Locomotive Error", e);
        }
    }

    public boolean releaseLock(Locomotive locomotive) throws LockingException {
        SRCPLocomotive sLocomotive = locomotiveSRCPLocomotiveMap
                .get(locomotive);
        try {
            return locomotiveControl.releaseLock(sLocomotive);
        } catch (SRCPLockingException e) {
            throw new LockingException("Locomotive Locked", e);
View Full Code Here

Examples of de.dermoba.srcp.model.locomotives.SRCPLocomotive

        }
    }

    public void addLocomotiveChangeListener(Locomotive locomotive,
            LocomotiveChangeListener listener) {
        SRCPLocomotive sLocomotive = locomotiveSRCPLocomotiveMap
                .get(locomotive);
        if (listeners.get(sLocomotive) == null) {
            listeners.put(sLocomotive,
                    new ArrayList<LocomotiveChangeListener>());
        }
View Full Code Here

Examples of de.dermoba.srcp.model.locomotives.SRCPLocomotive

    public void locomotiveChanged(SRCPLocomotive changedLocomotive) {
        informListeners(changedLocomotive);
    }

    public void lockChanged(Object changedLock, boolean locked) {
        SRCPLocomotive changedLocomotive = (SRCPLocomotive) changedLock;
        informListeners(changedLocomotive);
    }
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.