Package org.jboss.ws.extensions.wsrm.protocol

Examples of org.jboss.ws.extensions.wsrm.protocol.RMProvider


      sequence.addReceivedInboundMessage(seqHeader.getMessageNumber());
   }
  
   public static void setupRMOperations(EndpointMetaData endpointMD)
   {
      RMProvider rmProvider = RMProvider.get();
     
      // register createSequence method
      QName createSequenceQName = rmProvider.getConstants().getCreateSequenceQName();
      OperationMetaData createSequenceMD = new OperationMetaData(endpointMD, createSequenceQName, "createSequence");
      createSequenceMD.setOneWay(false);
      // setup addressing related data
      AddressingOpMetaExt createSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      createSequenceAddrExt.setInboundAction(RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION);
      createSequenceAddrExt.setOutboundAction(RMAddressingConstants.CREATE_SEQUENCE_RESPONSE_WSA_ACTION);
      createSequenceMD.addExtension(createSequenceAddrExt);
      // register operation metadata with endpoint metadata
      endpointMD.addOperation(createSequenceMD);
     
      // register sequenceAcknowledgement method
      QName sequenceAcknowledgementQName = rmProvider.getConstants().getSequenceAcknowledgementQName();
      OperationMetaData sequenceAcknowledgementMD = new OperationMetaData(endpointMD, sequenceAcknowledgementQName, "sequenceAcknowledgement");
      sequenceAcknowledgementMD.setOneWay(true);
      // setup addressing related data
      AddressingOpMetaExt sequenceAcknowledgementAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      sequenceAcknowledgementAddrExt.setInboundAction(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION);
      sequenceAcknowledgementMD.addExtension(sequenceAcknowledgementAddrExt);
      // register operation metadata with endpoint metadata
      endpointMD.addOperation(sequenceAcknowledgementMD);
     
      if (rmProvider.getMessageFactory().newCloseSequence() != null)
      {
         // register closeSequence method
         QName closeSequenceQName = rmProvider.getConstants().getCloseSequenceQName();
         OperationMetaData closeSequenceMD = new OperationMetaData(endpointMD, closeSequenceQName, "closeSequence");
         closeSequenceMD.setOneWay(false);
         // setup addressing related data
         AddressingOpMetaExt closeSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
         closeSequenceAddrExt.setInboundAction(RMAddressingConstants.CLOSE_SEQUENCE_WSA_ACTION);
         closeSequenceAddrExt.setOutboundAction(RMAddressingConstants.CLOSE_SEQUENCE_RESPONSE_WSA_ACTION);
         closeSequenceMD.addExtension(closeSequenceAddrExt);
         // register operation metadata with endpoint metadata
         endpointMD.addOperation(closeSequenceMD);
      }
     
      // register terminateSequence method
      QName terminateSequenceQName = rmProvider.getConstants().getTerminateSequenceQName();
      OperationMetaData terminateSequenceMD = new OperationMetaData(endpointMD, terminateSequenceQName, "terminateSequence");
      boolean isOneWay = rmProvider.getMessageFactory().newTerminateSequenceResponse() == null;
      terminateSequenceMD.setOneWay(isOneWay);
      // setup addressing related data
      AddressingOpMetaExt terminateSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      terminateSequenceAddrExt.setInboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_WSA_ACTION);
      if (!isOneWay)
View Full Code Here


      sequence.addReceivedInboundMessage(seqHeader.getMessageNumber());
   }
  
   public static void setupRMOperations(EndpointMetaData endpointMD)
   {
      RMProvider rmProvider = RMProvider.get();
     
      // register createSequence method
      QName createSequenceQName = rmProvider.getConstants().getCreateSequenceQName();
      OperationMetaData createSequenceMD = new OperationMetaData(endpointMD, createSequenceQName, "createSequence");
      createSequenceMD.setOneWay(false);
      // setup addressing related data
      AddressingOpMetaExt createSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      createSequenceAddrExt.setInboundAction(RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION);
      createSequenceAddrExt.setOutboundAction(RMAddressingConstants.CREATE_SEQUENCE_RESPONSE_WSA_ACTION);
      createSequenceMD.addExtension(createSequenceAddrExt);
      // register operation metadata with endpoint metadata
      endpointMD.addOperation(createSequenceMD);
     
      // register sequenceAcknowledgement method
      QName sequenceAcknowledgementQName = rmProvider.getConstants().getSequenceAcknowledgementQName();
      OperationMetaData sequenceAcknowledgementMD = new OperationMetaData(endpointMD, sequenceAcknowledgementQName, "sequenceAcknowledgement");
      sequenceAcknowledgementMD.setOneWay(true);
      // setup addressing related data
      AddressingOpMetaExt sequenceAcknowledgementAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      sequenceAcknowledgementAddrExt.setInboundAction(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION);
      sequenceAcknowledgementMD.addExtension(sequenceAcknowledgementAddrExt);
      // register operation metadata with endpoint metadata
      endpointMD.addOperation(sequenceAcknowledgementMD);
     
      if (rmProvider.getMessageFactory().newCloseSequence() != null)
      {
         // register closeSequence method
         QName closeSequenceQName = rmProvider.getConstants().getCloseSequenceQName();
         OperationMetaData closeSequenceMD = new OperationMetaData(endpointMD, closeSequenceQName, "closeSequence");
         closeSequenceMD.setOneWay(false);
         // setup addressing related data
         AddressingOpMetaExt closeSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
         closeSequenceAddrExt.setInboundAction(RMAddressingConstants.CLOSE_SEQUENCE_WSA_ACTION);
         closeSequenceAddrExt.setOutboundAction(RMAddressingConstants.CLOSE_SEQUENCE_RESPONSE_WSA_ACTION);
         closeSequenceMD.addExtension(closeSequenceAddrExt);
         // register operation metadata with endpoint metadata
         endpointMD.addOperation(closeSequenceMD);
      }
     
      // register terminateSequence method
      QName terminateSequenceQName = rmProvider.getConstants().getTerminateSequenceQName();
      OperationMetaData terminateSequenceMD = new OperationMetaData(endpointMD, terminateSequenceQName, "terminateSequence");
      boolean isOneWay = rmProvider.getMessageFactory().newTerminateSequenceResponse() == null;
      terminateSequenceMD.setOneWay(isOneWay);
      // setup addressing related data
      AddressingOpMetaExt terminateSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
      terminateSequenceAddrExt.setInboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_WSA_ACTION);
      if (!isOneWay)
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.wsrm.protocol.RMProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.