Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
This file is part of Niowire. Niowire is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Niowire is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License for more details. You should have received a copy of the Lesser GNU General Public License along with Niowire. If not, see <http://www.gnu.org/licenses/>.
 
 package io.niowire.serversource;
 
 import java.util.List;

This class describes a server definition object. It describes a socket server details and the processing which will be required when a connection is made (io.niowire.serializer.NioSerializer, io.niowire.inspection.NioInspector, io.niowire.service.NioService).

Author(s):
Trent Houliston
 
 public class NioServerDefinition
 {
 
 	//Our variables
 	protected String id;
 	protected String name;
 	//Box the port so it can be null (grab any free port)
 	protected Integer port;
 	protected NioObjectFactory<? extends NioInspectorinspectorFactory;
 	protected List<NioObjectFactory<? extends NioService>> serviceFactories;

Gets the ID (unique identifier) for this server

Returns:
the id
 
 	public String getId()
 	{
 		return ;
 	}

Sets the ID (unique identifier) for this server

Parameters:
id the id to set
 
 	public void setId(String id)
 	{
 		this. = id;
 	}

Gets the declared name for this server

Returns:
the name
 
 	public String getName()
 	{
 		return ;
 	}

Sets the declared name for this server

Parameters:
name the name to set
 
 	public void setName(String name)
 	{
 		this. = name;
 	}

Gets the port to listen on for this server

Returns:
the port
 
 	public Integer getPort()
 	{
 		return ;
 	}

Sets the port to listen on for this server

Parameters:
port the port to set
	public void setPort(Integer port)
	{
		this. = port;
	}

Gets the serializer factory for this source

Returns:
the serializerFactory
	{
	}

Sets the serializer factory for this source

Parameters:
serializerFactory the serializerFactory to set
	public void setSerializerFactory(NioObjectFactory<? extends NioSerializerserializerFactory)
	{
		this. = serializerFactory;
	}

Gets the inspector factory for this source

Returns:
the inspectorFactory
	{
	}

Sets the inspector factory for this source

Parameters:
inspectorFactory the inspectorFactory to set
	public void setInspectorFactory(NioObjectFactory<? extends NioInspectorinspectorFactory)
	{
		this. = inspectorFactory;
	}

Gets a list of service factories for this source

Returns:
the serviceFactories
	{
		//Make it unmodifiable
		return Collections.unmodifiableList();
	}

Sets a list of service factories for this source

Parameters:
serviceFactories the serviceFactories to set
	public void setServiceFactories(List<? extends NioObjectFactory<? extends NioService>> serviceFactories)
	{
		//Wrap it so that nobody else has access to our shared state
		this. = new LinkedList<NioObjectFactory<? extends NioService>>(serviceFactories);
	}
New to GrepCode? Check out our FAQ X