Package com.caucho.bam.mailbox

Examples of com.caucho.bam.mailbox.Mailbox


  {
    _broker = new HashMapBroker(getBrokerAddress());
   
    _skeleton = BamSkeleton.getSkeleton(getClass());
   
    Mailbox servletMailbox = createServletMailbox();
   
    _broker.addMailbox(servletMailbox);
  }
View Full Code Here


    {
      _in = new HmtpReader();
      _out = new HmtpWebSocketContextWriter(context);
     
      ManagedBroker broker = getBroker();
      Mailbox toLinkMailbox = new MultiworkerMailbox(_out.getAddress(), _out, broker, 1);
     
      _linkStream = new PassthroughBroker(toLinkMailbox);
      ClientStubManager clientManager = new ClientStubManager(broker, toLinkMailbox);
      _linkService = new ServerLinkActor(_linkStream, clientManager, _authManager, _ipAddress);
      _broker = new ServerProxyBroker(broker, clientManager,
View Full Code Here

    ManagedBroker broker = _bamService.getBroker();

    _hmtpWriter.setAddress("hmtp-server-" + _conn.getId() + "-hmtp");

    Mailbox toLinkMailbox = new MultiworkerMailbox(_hmtpWriter.getAddress(), _hmtpWriter, broker, 1);
    _toLinkBroker = new PassthroughBroker(toLinkMailbox);
   
    _clientManager = new ClientStubManager(broker, toLinkMailbox);

    _linkActor = new HmtpLinkActor(_toLinkBroker,
View Full Code Here

  public void addMailbox(Mailbox mailbox)
  {
    String address = mailbox.getAddress();

    synchronized (_actorMap) {
      Mailbox oldMailbox = _actorMap.get(address);

      if (oldMailbox != null)
        throw new IllegalStateException(L.l("duplicated address='{0}' is not allowed",
                                            address));
View Full Code Here

   * Sends a message to the desination mailbox.
   */
  @Override
  public void message(String to, String from, Serializable payload)
  {
    Mailbox mailbox = getMailbox(to);
   
    if (mailbox != null) {
      mailbox.message(to, from, payload);
      return;
    }
   
    // on startup, queue the messages until the startup completes
    if (isBeforeActive() && addStartupPacket(new Message(to, from, payload))) {
View Full Code Here

  public void messageError(String to,
                           String from,
                           Serializable payload,
                           BamError error)
  {
    Mailbox mailbox = getMailbox(to);
   
    if (mailbox != null) {
      mailbox.messageError(to, from, payload, error);
      return;
    }
   
    // on startup, queue the messages until the startup completes
    if (isBeforeActive()
View Full Code Here

   * Sends a query to the destination mailbox.
   */
  @Override
  public void query(long id, String to, String from, Serializable payload)
  {
    Mailbox mailbox = getMailbox(to);
   
    if (mailbox != null) {
      mailbox.query(id, to, from, payload);
      return;
    }
   
    // on startup, queue the messages until the startup completes
    if (isBeforeActive()
View Full Code Here

   * Sends a query to the destination mailbox.
   */
  @Override
  public void queryResult(long id, String to, String from, Serializable payload)
  {
    Mailbox mailbox = getMailbox(to);
   
    if (mailbox != null) {
      mailbox.queryResult(id, to, from, payload);
      return;
    }
   
    // on startup, queue the messages until the startup completes
    if (isBeforeActive()
View Full Code Here

   */
  @Override
  public void queryError(long id, String to, String from, Serializable payload,
                         BamError error)
  {
    Mailbox mailbox = getMailbox(to);
   
    if (mailbox != null) {
      mailbox.queryError(id, to, from, payload, error);
      return;
    }
   
    // on startup, queue the messages until the startup completes
    if (isBeforeActive()
View Full Code Here

  private void deliverStartupPackets()
  {
    Packet packet;
   
    while ((packet = extractStartupPacket()) != null) {
      Mailbox mailbox = getMailbox(packet.getTo());
     
      if (mailbox != null)
        packet.dispatch(mailbox, this);
      else {
        log.warning(this + " failed to find mailbox " + packet.getTo()
View Full Code Here

TOP

Related Classes of com.caucho.bam.mailbox.Mailbox

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.