Java Code Examples for org.apache.axis2.context.MessageContext#setMessageID()

The following examples show how to use org.apache.axis2.context.MessageContext#setMessageID() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GenericEventBasedConsumer.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context for the file
 */
private org.apache.synapse.MessageContext createMessageContext() {
    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUIDGenerator.getUUID());
    return msgCtx;
}
 
Example 2
Source File: GenericPollingConsumer.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context for the file
 */
private org.apache.synapse.MessageContext createMessageContext() {
    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUIDGenerator.getUUID());
    return msgCtx;
}
 
Example 3
Source File: JMSInjectHandler.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context for the file
 */
private org.apache.synapse.MessageContext createMessageContext() {
    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    //Need to set this to build the message
    msgCtx.setProperty(SynapseConstants.INBOUND_JMS_PROTOCOL, true);
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUIDGenerator.getUUID());
    msgCtx.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, true);
    return msgCtx;
}
 
Example 4
Source File: GRPCInjectHandler.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context for gRPC
 */
private org.apache.synapse.MessageContext createMessageContext() {
    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUIDGenerator.getUUID());
    msgCtx.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, true);
    return msgCtx;
}
 
Example 5
Source File: FileInjectHandler.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context for the file
 */
private org.apache.synapse.MessageContext createMessageContext() {

    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUIDGenerator.getUUID());
    axis2MsgCtx.setProperty(MessageContext.TRANSPORT_HEADERS, transportHeaders);
    msgCtx.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, true);
    return msgCtx;
}
 
Example 6
Source File: RabbitMQInjectHandler.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context for rabbitmq
 */
private org.apache.synapse.MessageContext createMessageContext() {
    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUID.randomUUID().toString());
    msgCtx.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, true);
    return msgCtx;
}
 
Example 7
Source File: MqttInjectHandler.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context
 */
private org.apache.synapse.MessageContext createMessageContext() {
    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUIDGenerator.getUUID());
    msgCtx.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, true);
    return msgCtx;
}
 
Example 8
Source File: KAFKAInjectHandler.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * Create the initial message context for kafka
 */
private org.apache.synapse.MessageContext createMessageContext() {
    org.apache.synapse.MessageContext msgCtx = synapseEnvironment.createMessageContext();
    MessageContext axis2MsgCtx = ((org.apache.synapse.core.axis2.Axis2MessageContext) msgCtx)
            .getAxis2MessageContext();
    axis2MsgCtx.setServerSide(true);
    axis2MsgCtx.setMessageID(UUIDGenerator.getUUID());
    msgCtx.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, true);
    return msgCtx;
}