X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-node%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fnode%2FDestInfo.java;fp=datarouter-node%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fnode%2FDestInfo.java;h=12253314e0e6dc9f79f5056fa37508ee383f8a61;hb=1841cb5d8da7b21996f8faad9d24f858e6ce8a41;hp=2b54f70ab763c8cf2e70be23a9ecce97991fd8db;hpb=4261823d84c2b911b68cdf4cb4dc3be429ebe285;p=dmaap%2Fdatarouter.git diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DestInfo.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DestInfo.java index 2b54f70a..12253314 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DestInfo.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DestInfo.java @@ -1,132 +1,153 @@ -/******************************************************************************* - * ============LICENSE_START================================================== - * * org.onap.dmaap - * * =========================================================================== - * * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * * =========================================================================== - * * Licensed 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. - * * ============LICENSE_END==================================================== - * * - * * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * * - ******************************************************************************/ - - -package org.onap.dmaap.datarouter.node; - -/** - * Information for a delivery destination that doesn't change from message to message - */ -public class DestInfo { - private String name; - private String spool; - private String subid; - private String logdata; - private String url; - private String authuser; - private String authentication; - private boolean metaonly; - private boolean use100; - /** - * Create a destination information object. - * @param name n:fqdn or s:subid - * @param spool The directory where files are spooled. - * @param subid The subscription ID (if applicable). - * @param logdata Text to be included in log messages - * @param url The URL to deliver to. - * @param authuser The auth user for logging. - * @param authentication The credentials. - * @param metaonly Is this a metadata only delivery? - * @param use100 Should I use expect 100-continue? - */ - public DestInfo(String name, String spool, String subid, String logdata, String url, String authuser, String authentication, boolean metaonly, boolean use100) { - this.name = name; - this.spool = spool; - this.subid = subid; - this.logdata = logdata; - this.url = url; - this.authuser = authuser; - this.authentication = authentication; - this.metaonly = metaonly; - this.use100 = use100; - } - public boolean equals(Object o) { - return((o instanceof DestInfo) && ((DestInfo)o).spool.equals(spool)); - } - public int hashCode() { - return(spool.hashCode()); - } - /** - * Get the name of this destination - */ - public String getName() { - return(name); - } - /** - * Get the spool directory for this destination. - * @return The spool directory - */ - public String getSpool() { - return(spool); - } - /** - * Get the subscription ID. - * @return Subscription ID or null if this is a node to node delivery. - */ - public String getSubId() { - return(subid); - } - /** - * Get the log data. - * @return Text to be included in a log message about delivery attempts. - */ - public String getLogData() { - return(logdata); - } - /** - * Get the delivery URL. - * @return The URL to deliver to (the primary URL). - */ - public String getURL() { - return(url); - - } - /** - * Get the user for authentication - * @return The name of the user for logging - */ - public String getAuthUser() { - return(authuser); - } - /** - * Get the authentication header - * @return The string to use to authenticate to the recipient. - */ - public String getAuth() { - return(authentication); - } - /** - * Is this a metadata only delivery? - * @return True if this is a metadata only delivery - */ - public boolean isMetaDataOnly() { - return(metaonly); - } - /** - * Should I send expect 100-continue header? - * @return True if I should. - */ - public boolean isUsing100() { - return(use100); - } -} +/******************************************************************************* + * ============LICENSE_START================================================== + * * org.onap.dmaap + * * =========================================================================== + * * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * * =========================================================================== + * * Licensed 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. + * * ============LICENSE_END==================================================== + * * + * * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * * + ******************************************************************************/ + + +package org.onap.dmaap.datarouter.node; + +/** + * Information for a delivery destination that doesn't change from message to message + */ +public class DestInfo { + private String name; + private String spool; + private String subid; + private String logdata; + private String url; + private String authuser; + private String authentication; + private boolean metaonly; + private boolean use100; + + /** + * Create a destination information object. + * + * @param name n:fqdn or s:subid + * @param spool The directory where files are spooled. + * @param subid The subscription ID (if applicable). + * @param logdata Text to be included in log messages + * @param url The URL to deliver to. + * @param authuser The auth user for logging. + * @param authentication The credentials. + * @param metaonly Is this a metadata only delivery? + * @param use100 Should I use expect 100-continue? + */ + public DestInfo(String name, String spool, String subid, String logdata, String url, String authuser, String authentication, boolean metaonly, boolean use100) { + this.name = name; + this.spool = spool; + this.subid = subid; + this.logdata = logdata; + this.url = url; + this.authuser = authuser; + this.authentication = authentication; + this.metaonly = metaonly; + this.use100 = use100; + } + + public boolean equals(Object o) { + return ((o instanceof DestInfo) && ((DestInfo) o).spool.equals(spool)); + } + + public int hashCode() { + return (spool.hashCode()); + } + + /** + * Get the name of this destination + */ + public String getName() { + return (name); + } + + /** + * Get the spool directory for this destination. + * + * @return The spool directory + */ + public String getSpool() { + return (spool); + } + + /** + * Get the subscription ID. + * + * @return Subscription ID or null if this is a node to node delivery. + */ + public String getSubId() { + return (subid); + } + + /** + * Get the log data. + * + * @return Text to be included in a log message about delivery attempts. + */ + public String getLogData() { + return (logdata); + } + + /** + * Get the delivery URL. + * + * @return The URL to deliver to (the primary URL). + */ + public String getURL() { + return (url); + + } + + /** + * Get the user for authentication + * + * @return The name of the user for logging + */ + public String getAuthUser() { + return (authuser); + } + + /** + * Get the authentication header + * + * @return The string to use to authenticate to the recipient. + */ + public String getAuth() { + return (authentication); + } + + /** + * Is this a metadata only delivery? + * + * @return True if this is a metadata only delivery + */ + public boolean isMetaDataOnly() { + return (metaonly); + } + + /** + * Should I send expect 100-continue header? + * + * @return True if I should. + */ + public boolean isUsing100() { + return (use100); + } +}