public void startServer() throws IOException { if (serverSocket == null) { if (endpoint.getHost() != null) { InetAddress address = InetAddress.getByName(endpoint.getHost()); serverSocket = new ServerSocket(endpoint.getPort(), endpoint.getBacklog(), address); } else { serverSocket = new ServerSocket(endpoint.getPort(), endpoint.getBacklog()); } } started = true; endpoint.getListener().getConfigurationContext().getThreadPool().execute(this); log.info("TCP server started on port : " + endpoint.getPort()); }
private void sendMessage(MessageContext messageContext, boolean isResume) { MessageWorker messageWorker = new MessageWorker(messageContext, isResume); // for annonymous sequence messages we have to use the same thread if (isAnonymous){ messageWorker.run(); } else { messageContext.getConfigurationContext().getThreadPool().execute(messageWorker); } }
public void startServer() throws IOException { if (serverSocket == null) { if (endpoint.getHost() != null) { InetAddress address = InetAddress.getByName(endpoint.getHost()); serverSocket = new ServerSocket(endpoint.getPort(), endpoint.getBacklog(), address); } else { serverSocket = new ServerSocket(endpoint.getPort(), endpoint.getBacklog()); } } started = true; endpoint.getListener().getConfigurationContext().getThreadPool().execute(this); log.info("TCP server started on port : " + endpoint.getPort()); }
/** * This is to create a separate thread to process business logic invocation. We create a AsyncMessageReceiverWorker * which internally calls the message receiver specified for the operation. * * We send the ACK through the incoming transport and reply through the address specified in replyTo address. * @param messageCtx msgContext the current MessageContext */ private void processAsAsync(MessageContext messageCtx) { AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( messageCtx); if (messageCtx.isDoingMTOM() || messageCtx.isDoingSwA()) { // If we are doing MTOM or SWA then we need to build with attachment, because we are going to close the incoming connection messageCtx.getEnvelope().buildWithAttachments(); } else { // We need to build the envelop since we are going to close the input stream messageCtx.getEnvelope().build(); } messageCtx.getConfigurationContext().getThreadPool().execute( worker); }
/** * This is to create a separate thread to process business logic invocation. We create a AsyncMessageReceiverWorker * which internally calls the message receiver specified for the operation. * * We send the ACK through the incoming transport and reply through the address specified in replyTo address. * @param messageCtx msgContext the current MessageContext */ private void processAsAsync(MessageContext messageCtx) { AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( messageCtx); if (messageCtx.isDoingMTOM() || messageCtx.isDoingSwA()) { // If we are doing MTOM or SWA then we need to build with attachment, because we are going to close the incoming connection messageCtx.getEnvelope().buildWithAttachments(); } else { // We need to build the envelop since we are going to close the input stream messageCtx.getEnvelope().build(); } messageCtx.getConfigurationContext().getThreadPool().execute( worker); }
public synchronized void soapFaultOccured() throws AxisFault { terminateRMSSequence(); if (this.errorCallback != null) { ErrorCallbackWorker errorCallbackWorker = new ErrorCallbackWorker(this.errorCallback, new SoapProcessingFaultException("Problem with processing the soap message")); this.axis2Info.getConfigurationContext().getThreadPool().execute(errorCallbackWorker); } }
public synchronized void invalidCreateSequenceResponseReceived() throws AxisFault { terminateRMSSequence(); if (this.errorCallback != null){ ErrorCallbackWorker errorCallbackWorker = new ErrorCallbackWorker(this.errorCallback, new RMSequenceCreationException("Invalid Sequence Response Received")); this.axis2Info.getConfigurationContext().getThreadPool().execute(errorCallbackWorker); } }
private void sendMessage(MessageContext messageContext, MessageContext responseMessageContext, boolean isResume, boolean isInvokeAsAnonClient, boolean isUseSameThread) { MessageWorker messageWorker = new MessageWorker(messageContext, responseMessageContext, isResume, isInvokeAsAnonClient); if (isInvokeAsAnonClient){ messageWorker.setRmsSequence(this); } if (isUseSameThread) { messageWorker.run(); } else { // we need to invoke this as annonymous client messageContext.getConfigurationContext().getThreadPool().execute(messageWorker); } }
public synchronized void rmsSequenceExpired() throws AxisFault { terminateRMSSequence(); if (this.errorCallback != null){ ErrorCallbackWorker errorCallbackWorker = new ErrorCallbackWorker(this.errorCallback, new RMSExpiresException("RMS Sequence has expires before properly terminating the sequence")); this.axis2Info.getConfigurationContext().getThreadPool().execute(errorCallbackWorker); } }
configurationContext.getThreadPool().execute(nextRunnable);
msgContext.getConfigurationContext().getThreadPool().execute( new TransportNonBlockingInvocationWorker(msgContext, sender)); } else {
msgContext.getConfigurationContext().getThreadPool().execute( new TransportNonBlockingInvocationWorker(msgContext, sender)); } else {
completed = true; } else { sc.getConfigurationContext().getThreadPool().execute( new NonBlockingInvocationWorker(mc, axisCallback));
completed = true; } else { sc.getConfigurationContext().getThreadPool().execute( new NonBlockingInvocationWorker(mc, axisCallback));
completed = true; } else { sc.getConfigurationContext().getThreadPool().execute( new OutOptInAxisOperationClient.NonBlockingInvocationWorker(mc, axisCallback));
ctx.getThreadPool().execute(work);
configContext.getThreadPool().execute(sequenceRemovalWorker);
this.configurationContext.getThreadPool().execute(rmsSequenceWorker);