Communication Xbeans

The sender and receiver Xbeans communicate an XML document across process and machine boundaries. There are currently six implementations of the sender and receiver. You must use matching senders and receivers. For example, you cannot expect an HTTP sender Xbean to communicate with a CORBA receiver Xbean.

All senders support the following org.xbeans.communication.XbeanSender interface:

public interface XbeanSender extends DOMListener {
    void setId(String id);
    String getId();
    void setCompression(boolean compressionOn);
    boolean getCompression();
}

The sender's id property indicates a string used to find the receiver. The id is protocol specific. For example, with HTTP and Servlet sender-receivers, the id is a URL. On the other hand, the id is a string to be resolved by the CORBA Name Service for the CORBA senders and receivers. Each protocol is described in more detail below.

The sender's compression property indicates whether the document should be compressed or not when it is sent over the wire.

All receivers support the following org.xbeans.communication.XbeanReceiver interface:

public interface XbeanReceiver extends DOMSource {
    void setId(String id);
    String getId();
    void setCompression(boolean isCompressed);
    void receive() throws XbeansException;
}

The receiver's id property indicates a string used to find the receiver. The id is protocol specific. For example, the id is a string to be resolved by the CORBA Name Service for the CORBA senders and receivers. Some protocols ignore this property. The id Each protocol is described in more detail below.

For most protocols, the receivers dynamically determine whether the received document is compressed. In that case, the compression property is ignored on the receiver. However, for some protocols the receiver is able to dynamically determine if the document is compressed. In that case, the compression property indicates whether the received document is compressed.

The receive() operation starts

For more protocol specific detail, select the sender-receiver you are interested in:

In addition, there is a generic sender and receiver that will let you select the protocol dynamically by setting a property. The generic sender and receiver dynamically load the correct Xbean based on the protocol property.