Package blackberry.core.threading

Examples of blackberry.core.threading.DispatchableEvent


        // Dispatch
        final Object[] args = new Object[] {
            connType, connObj   
        };
        Util.dispatchCallback(onConnAccepted, args);
        Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
            protected void dispatch() {
                synchronized(connObj) {
                    connObj.setDelivered();
                    connObj.notify();
                }
View Full Code Here


        // Dispatch
        final Object[] args = new Object[] {
            channelObj, new Integer(menuItemId),   
        };
        Util.dispatchCallback(onBBMMenuInvite, args);
        Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
            protected void dispatch() {
                synchronized(channelObj) {
                    channelObj.setDelivered();
                    channelObj.notify();
                }
View Full Code Here

        if(_onFileTransferFailed == null) {
            return;
        }

        final String reasonStr = ConstantsUtil.fileTransferReasonToString(reason);
        Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
            protected void dispatch() {
                try {
                    _onFileTransferFailed.invoke(null, new Object[] { reasonStr });
                } catch (Exception e) {
                    // do nothing
View Full Code Here

                final ConnectionObject connection =     (ConnectionObject) args[0];
                final ScriptableFunction onComplete = (ScriptableFunction) args[1];
                _onJoinReqReceived =                  (ScriptableFunction) args[2];
                _onJoinReqCanceled =                  (ScriptableFunction) args[3];
               
                Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
                    protected void dispatch() {
                        boolean hosting = connection.getConnection().setPublic();
                        if(hosting) {
                            _hostedConn = connection;
                        }
View Full Code Here

        protected Object execute(Object thiz, Object[] args) throws Exception {
            final String message =                            (String) args[0];
            final ScriptableFunction onComplete = (ScriptableFunction) args[1];
           
            Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
                protected void dispatch() {
                    boolean result;
                    try {
                        result = ((UserProfile) _presence).setPersonalMessage(message);
                    } catch(Exception e) {
View Full Code Here

            final String status =                             (String) args[0];
            final String statusMessage =                      (String) args[1];
            final ScriptableFunction onComplete = (ScriptableFunction) args[2];
            final int statusInt = BBMPlatformUser.statusToInt(status);
           
            Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
                protected void dispatch() {
                    boolean result;
                    try {
                        result = ((UserProfile) _presence).setStatus(statusInt, statusMessage);
                    } catch(Exception e) {
View Full Code Here

        protected Object execute(Object thiz, Object[] args) throws Exception {
            final String displayPicURI = (String) args[0];
            final ScriptableFunction onComplete = (ScriptableFunction) args[1];
            final Bitmap displayPic = Util.requestBitmap(displayPicURI);
           
            Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
                protected void dispatch() {
                    boolean result;
                    try {
                        result = ((UserProfile) _presence).setDisplayPicture(displayPic);
                    } catch(Exception e) {
View Full Code Here

            return pinFilter.validate(AbstractStringWrapper.createInstance(pin));
        }
    }

    public static void dispatchCallback(final ScriptableFunction function, final Object[] args) {
        Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
            protected void dispatch() {
                try {
                    function.invoke(null, args);
                } catch(Exception e) {
                    // do nothing
View Full Code Here

            final ScriptableFunction onComplete = (ScriptableFunction) args[0];       
            final Scriptable scriptInvitations =          (Scriptable) args[1];
            final BBMInvitationRequest[] invitations = this.scriptInvitesToJava(scriptInvitations);
            this.validateInvitations(invitations);
           
            Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
                protected void dispatch() {
                    try {
                        _uiService.inviteToBBM(invitations);
                    } catch(Exception e) {
                        Util.logError("UIService#inviteToBBM(BBMInvitationRequest[]) threw " + e);
View Full Code Here

            UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    MessagingService msgService = BBMPlatformNamespace.getInstance().getMessagingService();
                    final int result = msgService.sendDownloadInvitation();
                   
                    Dispatcher.getInstance().dispatch(new DispatchableEvent(null) {
                        protected void dispatch() {
                            // Convert to WW result object
                            final Object resultObj;
                            if(result == IOErrorCode.DOWNLOAD_INVITATION_LIMIT_REACHED) {
                                resultObj = "limitreached";
View Full Code Here

TOP

Related Classes of blackberry.core.threading.DispatchableEvent

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.