Examples of EventSourceDTO


Examples of org.wso2.carbon.eventing.eventsource.service.dto.EventSourceDTO

     *
     * @param eventSourceName name of the event source
     * @return description of the specified event source
     */
    public EventSourceDTO getEventSource(String eventSourceName) {
        EventSourceDTO eventSourceDTO = null;
        final Lock lock = getLock();
        try {
            lock.lock();
            SynapseConfiguration synapseConfiguration = getSynapseConfiguration();  
            SynapseEventSource synapseEventSource =
View Full Code Here

Examples of org.wso2.carbon.eventing.eventsource.service.dto.EventSourceDTO

     *
     * @param eventSource Synapse event source from which to obtain the event source description
     * @return an event source description
     */
    private EventSourceDTO buildEventSourceDTO(SynapseEventSource eventSource) {
        EventSourceDTO eventSourceDTO = new EventSourceDTO();
        eventSourceDTO.setName(eventSource.getName());
        eventSourceDTO.setClassName(eventSource.getSubscriptionManager().getClass().getName());
        /*Properties properties = new Properties();
        properties.setProperty("topicHeaderName", eventSource.getSubscriptionManager().getPropertyValue("topicHeaderName"));
        properties.setProperty("topicHeaderNS", eventSource.getSubscriptionManager().getPropertyValue("topicHeaderNS"));*/
        eventSourceDTO.setTopicHeaderName(eventSource.getSubscriptionManager().getPropertyValue(
                "topicHeaderName"));   //TODO add to constants
        eventSourceDTO.setTopicHeaderNS(
                eventSource.getSubscriptionManager().getPropertyValue("topicHeaderNS"));
        if (eventSourceDTO.getClassName()
                .equals("org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager")) {
            eventSourceDTO.setType("DefaultInMemory");
        }else if (eventSourceDTO.getClassName()
                .equals("org.apache.synapse.eventing.managers.org.wso2.carbon.eventing.impl.EmbeddedRegistryBasedSubscriptionManager")) {
            eventSourceDTO.setType("EmbRegistry");
        } else {
            eventSourceDTO.setType(
                    "Registry")//TODO this needs to be change to support any Subscription manager inherit from Subacription Manager
            eventSourceDTO.setRegistryUrl(
                    eventSource.getSubscriptionManager().getPropertyValue("registryURL"));
            eventSourceDTO
                    .setUsername(eventSource.getSubscriptionManager().getPropertyValue("username"));
            eventSourceDTO
                    .setPassword(eventSource.getSubscriptionManager().getPropertyValue("password"));
        }
        return eventSourceDTO;
    }
View Full Code Here

Examples of org.wso2.carbon.eventing.eventsource.stub.types.carbon.EventSourceDTO

   *
   * @param eventSourceName
   * @return
   */
  public boolean isEventSourceExisting(String eventSourceName) {
    EventSourceDTO eventsource = null;
    try {
      eventsource = stub.getEventSource(eventSourceName);
      if (eventsource != null)
        return true;
    } catch (RemoteException e) {
View Full Code Here

Examples of org.wso2.carbon.eventing.eventsource.stub.types.carbon.EventSourceDTO


    @Override
    public void runSuccessCase() {
        log.debug("Running Remote Registry SuccessCase ");
        EventSourceDTO eventSourceDTO = new EventSourceDTO();

        try {

            AuthenticateStub authenticateStub = new AuthenticateStub();
            EventSourceAdminServiceStub eventSourceAdminServiceStub = new EventSourceAdminServiceStub("https://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT + "/services/EventSourceAdminService");
            authenticateStub.authenticateAdminStub(eventSourceAdminServiceStub, sessionCookie);

            eventSourceDTO.setClassName("org.wso2.carbon.mediation.registry.WSO2Registry");
            eventSourceDTO.setName("SampleRRES");
            eventSourceDTO.setTopicHeaderName("org.wso2.carbon");
            eventSourceDTO.setType("RemoteRegistry");
            eventSourceDTO.setTopicHeaderNS("http://ws.apache.org/ns/synapse");
            eventSourceDTO.setRegistryUrl("/_system/config");
            eventSourceDTO.setUsername("admin");
            eventSourceDTO.setPassword("admin");

            eventSourceAdminServiceStub.addEventSource(eventSourceDTO); // adding new event source
            eventSourceAdminServiceStub.removeEventSource("SampleRRES");    //removing it

        }
View Full Code Here

Examples of org.wso2.carbon.eventing.eventsource.stub.types.carbon.EventSourceDTO

    @Override
    public void runSuccessCase() {
        log.debug("Default InMemory Running SuccessCase ");

        try {
            EventSourceDTO eventSourceDTO = new EventSourceDTO();
            AuthenticateStub authenticateStub = new AuthenticateStub();
            EventSourceAdminServiceStub eventSourceAdminServiceStub = new EventSourceAdminServiceStub("https://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT + "/services/EventSourceAdminService");
            authenticateStub.authenticateAdminStub(eventSourceAdminServiceStub, sessionCookie);

            eventSourceDTO.setClassName("org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager");
            eventSourceDTO.setName("SampleES");
            eventSourceDTO.setTopicHeaderName("org.wso2.carbon");
            eventSourceDTO.setType("DefaultInMemory");
            eventSourceDTO.setTopicHeaderNS("http://ws.apache.org/ns/synapse");

            eventSourceAdminServiceStub.addEventSource(eventSourceDTO); // adding new event source
            eventSourceAdminServiceStub.removeEventSource("SampleES");    //removing it

        }
View Full Code Here

Examples of org.wso2.carbon.eventing.eventsource.stub.types.carbon.EventSourceDTO


    @Override
    public void runSuccessCase() {
        log.debug("Embedded Registry Running SuccessCase ");
        EventSourceDTO eventSourceDTO = new EventSourceDTO();

        try {

            AuthenticateStub authenticateStub = new AuthenticateStub();
            EventSourceAdminServiceStub eventSourceAdminServiceStub = new EventSourceAdminServiceStub("https://" + FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT + "/services/EventSourceAdminService");
            authenticateStub.authenticateAdminStub(eventSourceAdminServiceStub, sessionCookie);

            eventSourceDTO.setClassName("org.apache.synapse.eventing.managers.EmbeddedRegistryBasedSubscriptionManager");
            eventSourceDTO.setName("SampleERES");
            eventSourceDTO.setTopicHeaderName("org.wso2.carbon");
            eventSourceDTO.setType("EmbeddedRegistry");
            eventSourceDTO.setTopicHeaderNS("http://ws.apache.org/ns/synapse");

            eventSourceAdminServiceStub.addEventSource(eventSourceDTO); // adding new event source
            eventSourceAdminServiceStub.removeEventSource("SampleERES");    //removing it

        } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.