directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r619239 [2/2] - in /directory/sandbox/slp/src: ./ main/ main/java/ main/java/org/ main/java/org/apache/ main/java/org/apache/directory/ main/java/org/apache/directory/server/ main/java/org/apache/directory/server/slp/ main/java/org/apache/d...
Date Thu, 07 Feb 2008 01:51:16 GMT
Added: directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceDeregistrationMessage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceDeregistrationMessage.java?rev=619239&view=auto
==============================================================================
--- directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceDeregistrationMessage.java
(added)
+++ directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceDeregistrationMessage.java
Wed Feb  6 17:51:14 2008
@@ -0,0 +1,176 @@
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+
+import org.apache.directory.server.slp.ServiceURL;
+
+/**
+ * Service Derigistration Message (SRVDEREG).
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public final class ServiceDeregistrationMessage extends AbstractSLPMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Deregistration =
+	 * 4.
+	 */
+	public static final byte FUNC_ID = 4;
+
+	public static final String TYPE = "SRVDEREG";
+
+	private String[] scopes;
+
+	private ServiceURL url;
+
+	private String[] tags;
+
+	public ServiceDeregistrationMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setScopes(String[] scopes) {
+		this.scopes = scopes;
+	}
+
+	public String[] getScopes() {
+		return scopes;
+	}
+
+	public void setServiceURL(ServiceURL url) {
+		this.url = url;
+	}
+
+	public ServiceURL getServiceURL() {
+		return url;
+	}
+
+	public void setTags(String[] tags) {
+		this.tags = tags;
+	}
+
+	public String[] getTags() {
+		return tags;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", scopes=" + Arrays.asList(scopes));
+		buffer.append(", url=" + url.toString());
+		buffer.append(", tags=" + Arrays.asList(tags));
+		buffer.append("]");
+		return buffer.toString();
+	}
+
+}
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+
+import org.apache.directory.server.slp.ServiceURL;
+
+/**
+ * Service Derigistration Message (SRVDEREG).
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public final class ServiceDeregistrationMessage extends AbstractSLPMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Deregistration =
+	 * 4.
+	 */
+	public static final byte FUNC_ID = 4;
+
+	public static final String TYPE = "SRVDEREG";
+
+	private String[] scopes;
+
+	private ServiceURL url;
+
+	private String[] tags;
+
+	public ServiceDeregistrationMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setScopes(String[] scopes) {
+		this.scopes = scopes;
+	}
+
+	public String[] getScopes() {
+		return scopes;
+	}
+
+	public void setServiceURL(ServiceURL url) {
+		this.url = url;
+	}
+
+	public ServiceURL getServiceURL() {
+		return url;
+	}
+
+	public void setTags(String[] tags) {
+		this.tags = tags;
+	}
+
+	public String[] getTags() {
+		return tags;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", scopes=" + Arrays.asList(scopes));
+		buffer.append(", url=" + url.toString());
+		buffer.append(", tags=" + Arrays.asList(tags));
+		buffer.append("]");
+		return buffer.toString();
+	}
+
+}

Added: directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRegistrationMessage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRegistrationMessage.java?rev=619239&view=auto
==============================================================================
--- directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRegistrationMessage.java
(added)
+++ directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRegistrationMessage.java
Wed Feb  6 17:51:14 2008
@@ -0,0 +1,240 @@
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+import org.apache.directory.server.slp.ServiceType;
+import org.apache.directory.server.slp.ServiceURL;
+import org.apache.directory.server.slp.impl.AuthenticationBlock;
+
+/**
+ * Service Registration Message (SRVREG)
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceRegistrationMessage extends AbstractSLPMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Registration =
+	 * 3.
+	 */
+	public static final byte FUNC_ID = 3;
+
+	public static final String TYPE = "SRVREG";
+
+	private ServiceURL serviceURL;
+
+	private ServiceType serviceType;
+
+	private String[] scopes = EMPTY;
+
+	private String[] attrList = EMPTY;
+
+	private AuthenticationBlock[] authBlocks;
+
+	public ServiceRegistrationMessage() {
+		super(FUNC_ID);
+	}
+
+	public ServiceURL getServiceURL() {
+		return serviceURL;
+	}
+
+	public void setServiceURL(final ServiceURL serviceURL) {
+		this.serviceURL = serviceURL;
+	}
+
+	public ServiceType getServiceType() {
+		return serviceType;
+	}
+
+	public void setServiceType(final ServiceType serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public String[] getScopes() {
+		return scopes;
+	}
+
+	public void setScopes(final String[] scopes) {
+		if (scopes != null) {
+			this.scopes = scopes;
+		}
+	}
+
+	public String[] getAttrList() {
+		return attrList;
+	}
+
+	public void setAttrList(final String[] attrList) {
+		this.attrList = attrList;
+	}
+
+	public void setAuthBlocks(final AuthenticationBlock[] authBlocks) {
+		this.authBlocks = authBlocks;
+	}
+
+	public AuthenticationBlock[] getAuthBlocks() {
+		return authBlocks;
+	}
+
+	public void verify() {
+
+	}
+
+	public void sign(final String[] spis) {
+
+	}
+
+	public String toString() {
+		final StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append("xid=" + xid);
+		buffer.append(", locale=" + locale);
+		buffer.append(", url: " + serviceURL);
+		buffer.append(", serviceType: " + serviceType);
+		buffer.append(", scopeList: " + Arrays.asList(scopes));
+		buffer.append(", attList: " + Arrays.asList(attrList));
+		buffer.append("]");
+		return buffer.toString();
+	}
+}
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+import org.apache.directory.server.slp.ServiceType;
+import org.apache.directory.server.slp.ServiceURL;
+import org.apache.directory.server.slp.impl.AuthenticationBlock;
+
+/**
+ * Service Registration Message (SRVREG)
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceRegistrationMessage extends AbstractSLPMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Registration =
+	 * 3.
+	 */
+	public static final byte FUNC_ID = 3;
+
+	public static final String TYPE = "SRVREG";
+
+	private ServiceURL serviceURL;
+
+	private ServiceType serviceType;
+
+	private String[] scopes = EMPTY;
+
+	private String[] attrList = EMPTY;
+
+	private AuthenticationBlock[] authBlocks;
+
+	public ServiceRegistrationMessage() {
+		super(FUNC_ID);
+	}
+
+	public ServiceURL getServiceURL() {
+		return serviceURL;
+	}
+
+	public void setServiceURL(final ServiceURL serviceURL) {
+		this.serviceURL = serviceURL;
+	}
+
+	public ServiceType getServiceType() {
+		return serviceType;
+	}
+
+	public void setServiceType(final ServiceType serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public String[] getScopes() {
+		return scopes;
+	}
+
+	public void setScopes(final String[] scopes) {
+		if (scopes != null) {
+			this.scopes = scopes;
+		}
+	}
+
+	public String[] getAttrList() {
+		return attrList;
+	}
+
+	public void setAttrList(final String[] attrList) {
+		this.attrList = attrList;
+	}
+
+	public void setAuthBlocks(final AuthenticationBlock[] authBlocks) {
+		this.authBlocks = authBlocks;
+	}
+
+	public AuthenticationBlock[] getAuthBlocks() {
+		return authBlocks;
+	}
+
+	public void verify() {
+
+	}
+
+	public void sign(final String[] spis) {
+
+	}
+
+	public String toString() {
+		final StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append("xid=" + xid);
+		buffer.append(", locale=" + locale);
+		buffer.append(", url: " + serviceURL);
+		buffer.append(", serviceType: " + serviceType);
+		buffer.append(", scopeList: " + Arrays.asList(scopes));
+		buffer.append(", attList: " + Arrays.asList(attrList));
+		buffer.append("]");
+		return buffer.toString();
+	}
+}

Added: directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceReplyMessage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceReplyMessage.java?rev=619239&view=auto
==============================================================================
--- directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceReplyMessage.java
(added)
+++ directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceReplyMessage.java
Wed Feb  6 17:51:14 2008
@@ -0,0 +1,126 @@
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+import org.apache.directory.server.slp.ServiceURL;
+
+/**
+ * Service Reply Message (SRVRPLY).
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceReplyMessage extends AbstractSLPReplyMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Reply = 2.
+	 */
+	public static final byte FUNC_ID = 2;
+
+	public static final String TYPE = "SRVRPLY";
+
+	private ServiceURL[] serviceURLs;
+
+	public ServiceReplyMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setServiceURLs(ServiceURL[] serviceURLs) {
+		this.serviceURLs = serviceURLs;
+	}
+
+	public ServiceURL[] getServiceURLs() {
+		return serviceURLs;
+	}
+
+	public String toString() {
+		final StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" - ");
+		buffer.append(getHeaderString());
+		buffer.append(", serviceURLs=");
+		buffer.append(Arrays.asList(serviceURLs));
+		return buffer.toString();
+	}
+}
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+import org.apache.directory.server.slp.ServiceURL;
+
+/**
+ * Service Reply Message (SRVRPLY).
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceReplyMessage extends AbstractSLPReplyMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Reply = 2.
+	 */
+	public static final byte FUNC_ID = 2;
+
+	public static final String TYPE = "SRVRPLY";
+
+	private ServiceURL[] serviceURLs;
+
+	public ServiceReplyMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setServiceURLs(ServiceURL[] serviceURLs) {
+		this.serviceURLs = serviceURLs;
+	}
+
+	public ServiceURL[] getServiceURLs() {
+		return serviceURLs;
+	}
+
+	public String toString() {
+		final StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" - ");
+		buffer.append(getHeaderString());
+		buffer.append(", serviceURLs=");
+		buffer.append(Arrays.asList(serviceURLs));
+		return buffer.toString();
+	}
+}

Added: directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRequestMessage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRequestMessage.java?rev=619239&view=auto
==============================================================================
--- directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRequestMessage.java
(added)
+++ directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceRequestMessage.java
Wed Feb  6 17:51:14 2008
@@ -0,0 +1,178 @@
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+
+import org.apache.directory.server.slp.ServiceType;
+
+/**
+ * Service Request Message (SRVRQST).
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceRequestMessage extends AbstractSLPRequestMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Request = 1.
+	 */
+	public static final byte FUNC_ID = 1;
+
+	public static final String TYPE = "SRVRQST";
+
+	private ServiceType serviceType;
+
+	private String predicate = "";
+
+	private String[] spis = EMPTY;
+
+	public ServiceRequestMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setServiceType(final ServiceType serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public ServiceType getServiceType() {
+		return serviceType;
+	}
+
+	public void setPredicate(final String predicate) {
+		if (predicate != null) {
+			this.predicate = predicate;
+		}
+	}
+
+	public String getPredicate() {
+		return predicate;
+	}
+
+	public void setSPIs(String[] spis) {
+		this.spis = spis;
+	}
+
+	public String[] getSPIs() {
+		return spis;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", serviceType=" + serviceType);
+		buffer.append(", predicate=" + predicate);
+		buffer.append(", spis=" + Arrays.asList(spis));
+		buffer.append("]");
+		return buffer.toString();
+	}
+
+}
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+
+import org.apache.directory.server.slp.ServiceType;
+
+/**
+ * Service Request Message (SRVRQST).
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceRequestMessage extends AbstractSLPRequestMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Request = 1.
+	 */
+	public static final byte FUNC_ID = 1;
+
+	public static final String TYPE = "SRVRQST";
+
+	private ServiceType serviceType;
+
+	private String predicate = "";
+
+	private String[] spis = EMPTY;
+
+	public ServiceRequestMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setServiceType(final ServiceType serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public ServiceType getServiceType() {
+		return serviceType;
+	}
+
+	public void setPredicate(final String predicate) {
+		if (predicate != null) {
+			this.predicate = predicate;
+		}
+	}
+
+	public String getPredicate() {
+		return predicate;
+	}
+
+	public void setSPIs(String[] spis) {
+		this.spis = spis;
+	}
+
+	public String[] getSPIs() {
+		return spis;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", serviceType=" + serviceType);
+		buffer.append(", predicate=" + predicate);
+		buffer.append(", spis=" + Arrays.asList(spis));
+		buffer.append("]");
+		return buffer.toString();
+	}
+
+}

Added: directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeReplyMessage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeReplyMessage.java?rev=619239&view=auto
==============================================================================
--- directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeReplyMessage.java
(added)
+++ directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeReplyMessage.java
Wed Feb  6 17:51:14 2008
@@ -0,0 +1,128 @@
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+import org.apache.directory.server.slp.ServiceType;
+
+/**
+ * Service Type Reply Message (SRVTYPEREPLY)
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceTypeReplyMessage extends AbstractSLPReplyMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Type Reply = 10.
+	 */
+	public static final byte FUNC_ID = 10;
+
+	public static final String TYPE = "SRVTYPERPLY";
+
+	private ServiceType[] serviceTypes;
+
+	public ServiceTypeReplyMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setServiceTypes(ServiceType[] serviceTypes) {
+		this.serviceTypes = serviceTypes;
+	}
+
+	public ServiceType[] getServiceTypes() {
+		return serviceTypes;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", serviceTypes=");
+		buffer.append(Arrays.asList(serviceTypes));
+		buffer.append("]");
+		return buffer.toString();
+	}
+}
+/*
+ *  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.directory.server.slp.messages;
+
+import java.util.Arrays;
+import org.apache.directory.server.slp.ServiceType;
+
+/**
+ * Service Type Reply Message (SRVTYPEREPLY)
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceTypeReplyMessage extends AbstractSLPReplyMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Type Reply = 10.
+	 */
+	public static final byte FUNC_ID = 10;
+
+	public static final String TYPE = "SRVTYPERPLY";
+
+	private ServiceType[] serviceTypes;
+
+	public ServiceTypeReplyMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setServiceTypes(ServiceType[] serviceTypes) {
+		this.serviceTypes = serviceTypes;
+	}
+
+	public ServiceType[] getServiceTypes() {
+		return serviceTypes;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", serviceTypes=");
+		buffer.append(Arrays.asList(serviceTypes));
+		buffer.append("]");
+		return buffer.toString();
+	}
+}

Added: directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeRequestMessage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeRequestMessage.java?rev=619239&view=auto
==============================================================================
--- directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeRequestMessage.java
(added)
+++ directory/sandbox/slp/src/main/java/org/apache/directory/server/slp/messages/ServiceTypeRequestMessage.java
Wed Feb  6 17:51:14 2008
@@ -0,0 +1,124 @@
+/*
+ *  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.directory.server.slp.messages;
+
+/**
+ * Service Type Request Message (SRVTYPERQST)
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceTypeRequestMessage extends AbstractSLPRequestMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Type Request =
+	 * 9.
+	 */
+	public static final byte FUNC_ID = 9;
+
+	public static final String TYPE = "SRVTYPERQST";
+
+	private String namingAuthority;
+
+	public ServiceTypeRequestMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setNamingAuthority(String namingAuthority) {
+		this.namingAuthority = namingAuthority;
+	}
+
+	public String getNamingAuthority() {
+		return namingAuthority;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", namingAuthority=" + namingAuthority);
+		buffer.append("]");
+		return buffer.toString();
+	}
+
+}
+/*
+ *  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.directory.server.slp.messages;
+
+/**
+ * Service Type Request Message (SRVTYPERQST)
+ * 
+ * @author Jan S. Rellermeyer, ETH Zurich
+ * 
+ */
+public class ServiceTypeRequestMessage extends AbstractSLPRequestMessage {
+
+	/**
+	 * the message funcID values according to RFC 2608, Service Type Request =
+	 * 9.
+	 */
+	public static final byte FUNC_ID = 9;
+
+	public static final String TYPE = "SRVTYPERQST";
+
+	private String namingAuthority;
+
+	public ServiceTypeRequestMessage() {
+		super(FUNC_ID);
+	}
+
+	public void setNamingAuthority(String namingAuthority) {
+		this.namingAuthority = namingAuthority;
+	}
+
+	public String getNamingAuthority() {
+		return namingAuthority;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(TYPE);
+		buffer.append(" [");
+		buffer.append(getHeaderString());
+		buffer.append(", namingAuthority=" + namingAuthority);
+		buffer.append("]");
+		return buffer.toString();
+	}
+
+}



Mime
View raw message