Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   *
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you under the Apache License, Version 2.0 (the
   * "License"); you may not use this file except in compliance
   * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  *
  */
 
 package org.apache.airavata.ws.monitor;
 
 import java.net.URI;
 import java.util.List;
 
 
 public class MonitorConfiguration extends EventProducer implements Cloneable{
 
     // private static final Logger logger = LoggerFactory.getLogger();
 
     private URI brokerURL;
 
     private String topic;
 
     private boolean pullMode;
 
     private URI messageBoxURL;
 
     private List<StringinteractiveNodeIDs = null;

    
Constructs a NotificationConfiguration.

Parameters:
brokerURL
topic
pullMode
messageBoxURL
 
     public MonitorConfiguration(URI brokerURLString topicboolean pullModeURI messageBoxURL) {
         set(brokerURLtopicpullModemessageBoxURL);
     }

    

Parameters:
brokerURL
topic
pullMode
messageBoxURL
 
     public void set(URI brokerURLString topicboolean pullModeURI messageBoxURL) {
         this. = brokerURL;
         this. = topic;
         this. = pullMode;
         this. = messageBoxURL;
     }

    

Parameters:
brokerURL The brokerLocation to set.
 
     public void setBrokerURL(URI brokerURL) {
         this. = brokerURL;
     }

    
Returns the URL of the notification broker.

Returns:
The URL of the notification broker
 
     public URI getBrokerURL() {
         return this.;
     }

    

Parameters:
topic The topic to set
 
     public void setTopic(String topic) {
         this. = StringUtil.trimAndNullify(topic);
     }

    

Returns:
The userId.
    public String getTopic() {
        return this.;
    }

    
Returns the messageBoxUrl.

Returns:
The messageBoxUrl
    public URI getMessageBoxURL() {
        return this.;
    }

    
Sets messageBoxUrl.

Parameters:
messageBoxURL The messageBoxUrl to set.
    public void setMessageBoxURL(URI messageBoxURL) {
        this. = messageBoxURL;
    }

    
Returns the pullMode.

Returns:
The pullMode
    public boolean isPullMode() {
        return this.;
    }

    
Sets pullMode.

Parameters:
pullMode The pullMode to set.
    public void setPullMode(boolean pullMode) {
        this. = pullMode;
    }

    

Returns:
true if the configuration is valid; false otherwise.
    public boolean isValid() {
        if (this. == null) {
            return false;
        }
        if (this. == null || this..length() == 0) {
            return false;
        }
        if (this. == true) {
            if (this. == null) {
                return false;
            }
        }
        return true;
    }

    
    @Override
    public MonitorConfiguration clone() {
        return new MonitorConfiguration(this.this.this.this.);
    }

    
Returns the interactiveNodeIDs.

Returns:
The interactiveNodeIDs
    public List<StringgetInteractiveNodeIDs() {
        return this.;
    }

    
Sets interactiveNodeIDs.

Parameters:
interactiveNodeIDs The interactiveNodeIDs to set.
    public void setInteractiveNodeIDs(List<StringinteractiveNodeIDs) {
        this. = interactiveNodeIDs;
    }
New to GrepCode? Check out our FAQ X