Package com.threerings.presents.server

Examples of com.threerings.presents.server.InvocationException


    public void cancel (ClientObject caller, InvocationService.ConfirmListener listener)
        throws InvocationException
    {
        // don't allow cancelation of a running tourney
        if (_trobj.state != TourneyObject.PENDING) {
            throw new InvocationException(ALREADY_IN_PROGRESS);

        // or a tourney that already has participants
        } else if (_trobj.participants.size() != 0) {
            throw new InvocationException(HAS_PLAYERS);

        } else {
            cancelTourney(CANCELLED);
        }
    }
View Full Code Here


    {
        BodyObject body = (BodyObject)caller;

        // make sure the tourney hasn't already started
        if (_trobj.state != TourneyObject.PENDING) {
            throw new InvocationException(TOO_LATE);
        }

        // make sure they haven't already signed up
        final Participant part = makeParticipant(body);
        if (_trobj.participants.contains(part)) {
            throw new InvocationException(ALREADY_IN_TOURNEY);
        }

        // allow the implementing class to do further join checks
        joinTourney(body);
View Full Code Here

    {
        BodyObject body = (BodyObject)caller;

        // can't leave unless the tourney is just pending
        if (_trobj.state != TourneyObject.PENDING) {
            throw new InvocationException(TOO_LATE_LEAVE);
        }

        Comparable<?> key = body.username;
        if (!_trobj.participants.containsKey(key)) {
            throw new InvocationException(NOT_IN_TOURNEY);
        }

        // remove them IMMEDIATELY from the participation list
        _trobj.removeFromParticipants(key);
View Full Code Here

        throws InvocationException
    {
        if (!(caller instanceof BodyObject)) {
            log.warning("Request to switch zones by non-BodyObject " +
                        "[clobj=" + caller.getClass() + "].");
            throw new InvocationException(ZoneCodes.INTERNAL_ERROR);
        }
        BodyObject body = (BodyObject)caller;

        PeerZoneMoveHandler handler = createMoveHandler(_locman, getZoneManager(zoneId),
            _screg, body, sceneId, sceneVer, listener);
View Full Code Here

TOP

Related Classes of com.threerings.presents.server.InvocationException

Copyright © 2018 www.massapicom. 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.