CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-javax--javaee-api

Complete Java Enterprise Edition 8 specification APIs providing all standardized enterprise application development interfaces

Pending
Overview
Eval results
Files

messaging.mddocs/

Messaging

JMS API for asynchronous messaging with support for queues, topics, and message-driven beans.

Core Interfaces

public interface ConnectionFactory;

public interface Connection extends AutoCloseable {
    Session createSession() throws JMSException;
    Session createSession(boolean transacted, int acknowledgeMode) throws JMSException;
    void start() throws JMSException;
    void stop() throws JMSException;
    void close() throws JMSException;
}

public interface Session extends Runnable, AutoCloseable {
    MessageProducer createProducer(Destination destination) throws JMSException;
    MessageConsumer createConsumer(Destination destination) throws JMSException;
    Message createMessage() throws JMSException;
    TextMessage createTextMessage() throws JMSException;
    TextMessage createTextMessage(String text) throws JMSException;
    void commit() throws JMSException;
    void rollback() throws JMSException;
    void close() throws JMSException;
}

Message Types

public interface Message {
    String getJMSMessageID() throws JMSException;
    void setJMSMessageID(String id) throws JMSException;
    long getJMSTimestamp() throws JMSException;
    void setJMSTimestamp(long timestamp) throws JMSException;
    Destination getJMSDestination() throws JMSException;
    void setJMSDestination(Destination destination) throws JMSException;
}

public interface TextMessage extends Message {
    void setText(String string) throws JMSException;
    String getText() throws JMSException;
}

Usage Example

@MessageDriven
public class OrderMessageBean implements MessageListener {
    
    @Override
    public void onMessage(Message message) {
        try {
            if (message instanceof TextMessage) {
                TextMessage textMessage = (TextMessage) message;
                String orderData = textMessage.getText();
                // Process order
            }
        } catch (JMSException e) {
            // Handle exception
        }
    }
}

Install with Tessl CLI

npx tessl i tessl/maven-javax--javaee-api

docs

dependency-injection.md

ejb.md

enterprise-services.md

index.md

json-processing.md

messaging.md

persistence.md

rest-services.md

security.md

transactions.md

validation.md

web-services.md

web-technologies.md

xml-binding.md

tile.json