Examples of BBMPlatformUser


Examples of blackberry.bbm.platform.users.BBMPlatformUser

        this.waitForConnDelivery();
       
        try {
            final ScriptableFunction callback = (ScriptableFunction) _connObj.getField(ConnectionObject.EVENT_ON_USER_DECLINED);
            final Object[] args = new Object[] {
                new BBMPlatformUser(contact),
            };
            Util.dispatchCallback(callback, args);
        } catch(Exception e) {
            // do nothing
        }
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

        this.waitForConnDelivery();
       
        try {
            final ScriptableFunction callback = (ScriptableFunction) _connObj.getField(ConnectionObject.EVENT_ON_USER_LEFT);
            final Object[] args = new Object[] {
                new BBMPlatformUser(contact),
            };
            Util.dispatchCallback(callback, args);
        } catch(Exception e) {
            // do nothing
        }
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

        this.waitForConnDelivery();
       
        try {
            final ScriptableFunction callback = (ScriptableFunction) _connObj.getField(ConnectionObject.EVENT_ON_DATA);
            final Object[] args = new Object[] {
                new BBMPlatformUser(contact),
                data.getDataAsString(),
            };
            Util.dispatchCallback(callback, args);
        } catch(Exception e) {
            // do nothing
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

       
        final SessionObject sessionObj = (SessionObject)_connListenerImpl.getConnectionObject();
        try {
            final ScriptableFunction callback = (ScriptableFunction) sessionObj.getField(SessionObject.EVENT_ON_BROADCAST_DATA);
            final Object[] args = new Object[] {
                new BBMPlatformUser(sender),
                data.getDataAsString(),
            };
            Util.dispatchCallback(callback, args);
        } catch(Exception e) {
            // do nothing
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

       
        final SessionObject sessionObj = (SessionObject)_connListenerImpl.getConnectionObject();
        try {
            final ScriptableFunction callback = (ScriptableFunction) sessionObj.getField(SessionObject.EVENT_ON_USERS_REMOVED);
            final Object[] args = new Object[] {
                new BBMPlatformUser(removedBy),
                Util.contactListToArray(contactList),
            };
            Util.dispatchCallback(callback, args);
        } catch(Exception e) {
            // do nothing
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

        }
    } // InviteContactsFunction
   
    private class AddFunction extends ScriptableFunctionBase {
        protected Object execute(Object thiz, Object[] args) throws Exception {
            final BBMPlatformUser user = (BBMPlatformUser) args[0];
            final BBMPlatformContact contact = (BBMPlatformContact) user.getPresence();
           
            // Cookie is optional
            final String cookie;
            if(args.length >= 2) {
                cookie = (String) args[1];
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

   
    private class RemoveFunction extends ScriptableFunctionBase {
        protected Object execute(Object thiz, Object[] args) throws Exception {
            Object arg0 = args[0];
            if(arg0 instanceof BBMPlatformUser) {
                BBMPlatformUser user = (BBMPlatformUser) arg0;
                BBMPlatformContact contact = (BBMPlatformContact) user.getPresence();
                _connection.remove(contact);
            } else if(arg0 instanceof Scriptable) {
                BBMPlatformUser[] usersArray = Util.scriptableUsersArrayToUserArray((Scriptable) arg0);
                BBMPlatformContactList contactList = Util.userArrayToContactList(usersArray);
                _connection.remove(contactList);
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

        if(name.equals(FIELD_ID) || name.equals(FIELD_STATUS)) {
            return super.getField(name);
        } else if(name.equals(FIELD_COOKIE)) {
            return getRequest().getCookie();            
        } else if(name.equals(FIELD_PEER)) {
            return new BBMPlatformUser(getRequest().getRequester());
        } else if(name.equals(FUNC_ACCEPT)) {
            return new AcceptFunction();
        } else if(name.equals(FUNC_DECLINE)) {
            return new DeclineFunction();
        } else {
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

    public void sessionEnded(BBMPlatformContact contact, BBMPlatformSession session) {
        final SessionObject sessionObj = (SessionObject)_connsHashConnObjs.get(session);
        try {
            final ScriptableFunction callback = (ScriptableFunction) sessionObj.getField(SessionObject.EVENT_ON_ENDED);
            final Object[] args = { new BBMPlatformUser(contact) };
            Util.dispatchCallback(callback, args);
        } catch( Exception e ) {
            // do nothing
        }
    }
View Full Code Here

Examples of blackberry.bbm.platform.users.BBMPlatformUser

            callback = (ScriptableFunction) _ioNamespace.getField(IONamespace.EVENT_ON_USER_REACHABLE);
        } catch(Exception e) {
            return;
        }
        final Object[] args = {
            new BBMPlatformUser(contact),
        };
        Util.dispatchCallback(callback, args);
    }
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.