Examples of DataManager


Examples of Core.DataManager

        pileNodeValueIsChanged = false;
        pileDataValueIsChanged = false;
        manualEntry = true;
        mainForm = parent;
        numOfNodes = 1;
        dataManager = new DataManager(data);


    }
View Full Code Here

Examples of cave.nice.testMessage.data.DataManager

  private UriInfo uriInfo;

  @GET
  @Produces(MediaType.APPLICATION_JSON)
  public Response getVerifiedAccounts() throws WebApplicationException {
    DataManager dataManager = getDataManager();
    try {
      return Response.ok(dataManager.getVerifiedAccounts()).build();
    } catch (CannotRetrieveEntitiesException e) {
      // TODO Log error, not return it
      throw new WebApplicationException(Response.serverError().entity(e)
          .build());
    } finally {
      dataManager.close();
    }
  }
View Full Code Here

Examples of com.intellij.ide.DataManager

  }

  public TextFieldWithBrowseButton(JTextField field, ActionListener browseActionListener) {
    super(field, browseActionListener);
    if (ApplicationManager.getApplication() != null) {
      final DataManager manager = DataManager.getInstance();
      if (manager != null) {
        installPathCompletion(DataKeys.PROJECT.getData(manager.getDataContext()), FileChooserDescriptorFactory.createSingleLocalFileDescriptor());
      }
    }
  }
View Full Code Here

Examples of com.sun.sgs.app.DataManager

        {
            this.sender = sender;
            this.count = count;
           
            // create managed references
            DataManager dm = AppContext.getDataManager();
            opsRef = dm.createReference(new OpsList());
        }
View Full Code Here

Examples of com.sun.sgs.app.DataManager

        // NOTE: we can't directly save the item in the list, or
        // we'll end up with a local copy of the item. Instead, we
        // must save a ManagedReference to the item.

        DataManager dataManager = AppContext.getDataManager();
        dataManager.markForUpdate(this);

        return items.add(dataManager.createReference(item));
    }
View Full Code Here

Examples of com.sun.sgs.app.DataManager

     */
    public boolean addPlayer(SwordWorldPlayer player) {
        logger.log(Level.INFO, "{0} enters {1}",
            new Object[] { player, this });

        DataManager dataManager = AppContext.getDataManager();
        dataManager.markForUpdate(this);

        return players.add(dataManager.createReference(player));
    }
View Full Code Here

Examples of com.sun.sgs.app.DataManager

     */
    public boolean removePlayer(SwordWorldPlayer player) {
        logger.log(Level.INFO, "{0} leaves {1}",
            new Object[] { player, this });

        DataManager dataManager = AppContext.getDataManager();
        dataManager.markForUpdate(this);

        return players.remove(dataManager.createReference(player));
    }
View Full Code Here

Examples of com.sun.sgs.app.DataManager

     */
    public static SwordWorldPlayer loggedIn(ClientSession session) {
        String playerBinding = PLAYER_BIND_PREFIX + session.getName();

        // try to find player object, if non existent then create
        DataManager dataMgr = AppContext.getDataManager();
        SwordWorldPlayer player;

        try {
            player = (SwordWorldPlayer) dataMgr.getBinding(playerBinding);
        } catch (NameNotBoundException ex) {
            // this is a new player
            player = new SwordWorldPlayer(playerBinding);
            logger.log(Level.INFO, "New player created: {0}", player);
            dataMgr.setBinding(playerBinding, player);
        }
        player.setSession(session);
        return player;
    }
View Full Code Here

Examples of com.sun.sgs.app.DataManager

     * Mark this player as logged in on the given session.
     *
     * @param session the session this player is logged in on
     */
    protected void setSession(ClientSession session) {
        DataManager dataMgr = AppContext.getDataManager();
        dataMgr.markForUpdate(this);

        currentSessionRef = dataMgr.createReference(session);

        logger.log(Level.INFO,
            "Set session for {0} to {1}",
            new Object[] { this, session });
    }
View Full Code Here

Examples of com.sun.sgs.app.DataManager

     * is null, marks the player as not in any room.
     * <p>
     * @param room the room this player should be in, or {@code null}
     */
    protected void setRoom(SwordWorldRoom room) {
        DataManager dataManager = AppContext.getDataManager();
        dataManager.markForUpdate(this);

        if (room == null) {
            currentRoomRef = null;
            return;
        }

        currentRoomRef = dataManager.createReference(room);
    }
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.