Examples of MessageManager


Examples of com.deitel.messenger.MessageManager

public class DeitelMessenger
{  
   public static void main( String args[] )
   {
      MessageManager messageManager; // declare MessageManager
     
      if ( args.length == 0 )
         // connect to localhost
         messageManager = new SocketMessageManager( "localhost" );
      else
View Full Code Here

Examples of com.dianping.cat.message.spi.MessageManager

  }

  // this should be called when a thread starts to create some thread local
  // data
  public static void setup(String sessionToken) {
    MessageManager manager = s_instance.m_manager;

    if (manager == null) {
      checkAndInitialize();
    }
    manager.setup();
    manager.getThreadLocalMessageTree().setSessionToken(sessionToken);
  }
View Full Code Here

Examples of com.dianping.cat.message.spi.MessageManager

    }
  }

  @Override
  public void fork() {
    MessageManager manager = getManager();

    manager.setup();
    manager.start(this, false);

    MessageTree tree = manager.getThreadLocalMessageTree();

    if (tree != null) {
      m_forkedMessageId = tree.getMessageId();
      tree.setRootMessageId(m_rootMessageId == null ? m_parentMessageId : m_rootMessageId);
      tree.setParentMessageId(m_parentMessageId);
View Full Code Here

Examples of com.samskivert.servlet.MessageManager

            // tool wishes to make use of it
            ictx.put(APPLICATION_KEY, _app);

            // if the application provides a message manager, we want create a
            // translation tool and stuff that into the context
            MessageManager msgmgr = _app.getMessageManager();
            if (msgmgr != null) {
                I18nTool i18n = new I18nTool(req, msgmgr);
                ictx.put(I18NTOOL_KEY, i18n);
            }

            // create a form tool for use by the template
            FormTool form = new FormTool(req);
            ictx.put(FORMTOOL_KEY, form);

            // create a new string tool for use by the template
            StringTool string = new StringTool();
            ictx.put(STRINGTOOL_KEY, string);

            // create a new data tool for use by the tempate
            DataTool datatool = new DataTool();
            ictx.put(DATATOOL_KEY, datatool);

            // create a curreny tool set up to use the correct locale
            CurrencyTool ctool = new CurrencyTool(req.getLocale());
            ictx.put(CURRENCYTOOL_KEY, ctool);

            // allow the application to prepare the context
            _app.prepareContext(ictx);

            // allow the application to do global access control
            _app.checkAccess(ictx);

            // resolve the appropriate logic class for this URI and execute it
            // if it exists
            String path = req.getServletPath();
            logic = resolveLogic(path);
            if (logic != null) {
                logic.invoke(_app, ictx);
            }

        } catch (Exception e) {
            error = e;
        }

        // if an error occurred processing the template, allow the application
        // to convert it to something more appropriate and then handle it
        String errmsg = null;
        try {
            if (error != null) {
                throw _app.translateException(error);
            }

        } catch (RedirectException re) {
            rsp.sendRedirect(re.getRedirectURL());
            return null;

        } catch (HttpErrorException hee) {
            String msg = hee.getErrorMessage();
            if (msg != null) {
                rsp.sendError(hee.getErrorCode(), msg);
            } else {
                rsp.sendError(hee.getErrorCode());
            }
            return null;

        } catch (FriendlyException fe) {
            // grab the error message, we'll deal with it shortly
            errmsg = fe.getMessage();

        } catch (Exception e) {
            errmsg = _app.handleException(req, logic, e);
        }

        // if we have an error message, insert it into the template
        if (errmsg != null) {
            // try using the application to localize the error message
            // before we insert it
            MessageManager msgmgr = _app.getMessageManager();
            if (msgmgr != null) {
                errmsg = msgmgr.getMessage(req, errmsg);
            }
            ictx.put(ERROR_KEY, errmsg);
        }

        return tmpl;
View Full Code Here

Examples of com.threerings.util.MessageManager

        _rmgr.initBundles(null, "config/resource/editor.properties", obs);
    }

    public void finishInit (String target)
    {
        _msgmgr = new MessageManager("rsrc.i18n");
        _imgr = new ImageManager(_rmgr, _frame);
        _tilemgr = new EditorTileManager(_rmgr, _imgr);

        try {
            _tsrepo = new BundledTileSetRepository(_rmgr, _imgr, "tilesets");
View Full Code Here

Examples of net.minecraft.src.forge.MessageManager

    }

    @Override
    public void onLogin(NetworkManager network, Packet1Login login) {
       
        MessageManager messageManager = MessageManager.getInstance();
        messageManager.registerChannel(network, this, CHANNEL);
        messageManager.addActiveChannel(network, CHANNEL);
    }
View Full Code Here

Examples of net.minecraft.src.forge.MessageManager

    }

    @Override
    public void onDisconnect(NetworkManager network, String message, Object[] args) {
       
        MessageManager messageManager = MessageManager.getInstance();
        messageManager.unregisterChannel(network, this, CHANNEL);
        messageManager.removeActiveChannel(network, CHANNEL);
    }
View Full Code Here

Examples of net.minecraft.src.forge.MessageManager

    }

    @Override
    public void onLogin(NetworkManager network, Packet1Login login) {
       
        MessageManager messageManager = MessageManager.getInstance();
        messageManager.registerChannel(network, this, CHANNEL);
        messageManager.addActiveChannel(network, CHANNEL);
    }
View Full Code Here

Examples of net.minecraft.src.forge.MessageManager

    }

    @Override
    public void onDisconnect(NetworkManager network, String message, Object[] args) {
       
        MessageManager messageManager = MessageManager.getInstance();
        messageManager.unregisterChannel(network, this, CHANNEL);
        messageManager.removeActiveChannel(network, CHANNEL);
    }
View Full Code Here

Examples of org.apache.james.mailbox.MessageManager

        super(ExpungeRequest.class, next, mailboxManager, factory);
    }

    protected void doProcess(ExpungeRequest request, ImapSession session, String tag, ImapCommand command, Responder responder) {
        try {
            final MessageManager mailbox = getSelectedMailbox(session);
            final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);

            int expunged = 0;
            MetaData mdata = mailbox.getMetaData(false, mailboxSession, FetchGroup.NO_COUNT);

            if (!mdata.isWriteable()) {
                no(command, tag, responder, HumanReadableText.MAILBOX_IS_READ_ONLY);
            } else {
                IdRange[] ranges = request.getUidSet();
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.