com.caucho.xmpp
Class XmppWriter

java.lang.Object
  extended by com.caucho.bam.broker.AbstractBrokerStream
      extended by com.caucho.bam.broker.AbstractBroker
          extended by com.caucho.xmpp.XmppWriter
All Implemented Interfaces:
Broker, MessageStream

public class XmppWriter
extends AbstractBroker

xmpp client to broker


Method Summary
 java.lang.String getAddress()
          Returns the broker's address, i.e.
 Broker getBrokerStream()
           
 Mailbox getMailbox(java.lang.String address)
          Returns the actor stream for the given address.
 void message(java.lang.String to, java.lang.String from, java.io.Serializable value)
          Receives a unidirectional message.
 void messageError(java.lang.String to, java.lang.String from, java.io.Serializable value, BamError error)
          Receives a message error.
 void presence(java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void presenceProbe(java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void presenceSubscribe(java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void presenceSubscribed(java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void presenceUnavailable(java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void presenceUnsubscribe(java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void presenceUnsubscribed(java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void queryError(long id, java.lang.String to, java.lang.String from, java.io.Serializable value, BamError error)
          Handles a query error from a service Actor.
 void queryGet(long id, java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 void queryResult(long id, java.lang.String to, java.lang.String from, java.io.Serializable value)
          Handles a query response from a service Actor.
 void querySet(long id, java.lang.String to, java.lang.String from, java.io.Serializable value)
           
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.bam.broker.AbstractBroker
addMailbox, close, getBroker, getBrokerMailbox, isClosed, removeMailbox
 
Methods inherited from class com.caucho.bam.broker.AbstractBrokerStream
query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.bam.stream.MessageStream
query
 

Method Detail

getBrokerStream

public Broker getBrokerStream()

getAddress

public java.lang.String getAddress()
Description copied from class: AbstractBroker
Returns the broker's address, i.e. the virtual host domain name.

Specified by:
getAddress in interface MessageStream
Overrides:
getAddress in class AbstractBroker

message

public void message(java.lang.String to,
                    java.lang.String from,
                    java.io.Serializable value)
Description copied from class: AbstractBrokerStream
Receives a unidirectional message. The abstract implementation ignores the message.

Specified by:
message in interface MessageStream
Overrides:
message in class AbstractBrokerStream
Parameters:
to - the target actor's address
from - the source actor's address
value - the message payload

messageError

public void messageError(java.lang.String to,
                         java.lang.String from,
                         java.io.Serializable value,
                         BamError error)
Description copied from class: AbstractBrokerStream
Receives a message error. The abstract implementation ignores the message.

Specified by:
messageError in interface MessageStream
Overrides:
messageError in class AbstractBrokerStream
Parameters:
to - the target actor's address
from - the source actor's address
value - the original message payload
error - the message error

queryGet

public void queryGet(long id,
                     java.lang.String to,
                     java.lang.String from,
                     java.io.Serializable value)

querySet

public void querySet(long id,
                     java.lang.String to,
                     java.lang.String from,
                     java.io.Serializable value)

queryResult

public void queryResult(long id,
                        java.lang.String to,
                        java.lang.String from,
                        java.io.Serializable value)
Description copied from class: AbstractBrokerStream
Handles a query response from a service Actor. The default implementation ignores the packet.

Specified by:
queryResult in interface MessageStream
Overrides:
queryResult in class AbstractBrokerStream
Parameters:
id - the query identifier used to match requests with responses
to - the client actor's address
from - the service actor's address
value - the result payload

queryError

public void queryError(long id,
                       java.lang.String to,
                       java.lang.String from,
                       java.io.Serializable value,
                       BamError error)
Description copied from class: AbstractBrokerStream
Handles a query error from a service Actor. The default implementation ignores the packet.

Specified by:
queryError in interface MessageStream
Overrides:
queryError in class AbstractBrokerStream
Parameters:
id - the query identifier used to match requests with responses
to - the client actor's address
from - the service actor's address
value - the result payload
error - additional error information

presence

public void presence(java.lang.String to,
                     java.lang.String from,
                     java.io.Serializable value)

presenceProbe

public void presenceProbe(java.lang.String to,
                          java.lang.String from,
                          java.io.Serializable value)

presenceUnavailable

public void presenceUnavailable(java.lang.String to,
                                java.lang.String from,
                                java.io.Serializable value)

presenceSubscribe

public void presenceSubscribe(java.lang.String to,
                              java.lang.String from,
                              java.io.Serializable value)

presenceSubscribed

public void presenceSubscribed(java.lang.String to,
                               java.lang.String from,
                               java.io.Serializable value)

presenceUnsubscribe

public void presenceUnsubscribe(java.lang.String to,
                                java.lang.String from,
                                java.io.Serializable value)

presenceUnsubscribed

public void presenceUnsubscribed(java.lang.String to,
                                 java.lang.String from,
                                 java.io.Serializable value)

toString

public java.lang.String toString()
Overrides:
toString in class AbstractBrokerStream

getMailbox

public Mailbox getMailbox(java.lang.String address)
Description copied from class: AbstractBrokerStream
Returns the actor stream for the given address.

Specified by:
getMailbox in interface Broker
Overrides:
getMailbox in class AbstractBroker
Parameters:
address - the address of the mailbox
Returns:
the mailbox with the given address or null