public function addService($service, $serviceName = 0) 
	{
		if ( is_object( $service ) ) 
		{
			$reflection = new ReflectionObject( $service );
		} 
		else if ( is_string( $service ) && class_exists( $service ) ) 
		{
			$reflection = new ReflectionClass( $service );
		} 
		else if ( is_callable( $service ) ) // method passed directly
		{ 
			$this->addMethod( $serviceName, $service );
			return;
		} 
		else 
		{
			throw new Ripcord_InvalidArgumentException( 'Unknown service type ' . $serviceName, 
				ripcord::unknownServiceType );
		}
		if ( $serviceName && !is_numeric( $serviceName ) ) 
		{
			$serviceName .= '.';
		} 
		else 
		{
			$serviceName = '';
		}
		$methods = $reflection->getMethods();
		if ( is_array( $methods ) ) 
		{
			foreach( $methods as $method ) 
			{
				if ( substr( $method->name, 0, 1 ) != '_'
					&& !$method->isPrivate() && !$method->isProtected()) 
				{
					$rpcMethodName = $serviceName . $method->name;
					$this->addMethod( 
						$rpcMethodName, 
						array( $service, $method->name )
					);
				}
			}
		}
	}