//
// HTTPOutput.java
//
// The contents of this file are subject to the SNIA Public License Version 1.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.snia.org/resources/openSource.html
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 
// License for the specific language governing rights and limitations
// under the License.
//
// The Original Code is HTTPOutput.java
// 
// The Initial Developer of the Original Code is David Simons.
//
// Contributor(s):
//
//
// This source uses the Solaris WBEM APIs version 2.2. 
// Synchronization will be maintained with the Solaris WBEM APIS,
// which are being standardized through the Java Community Process.
//
//
// $Id: HTTPOutput.java,v 1.1 2003/07/17 18:32:55 kumpf Exp $
//
// $Log: HTTPOutput.java,v $
// Revision 1.1  2003/07/17 18:32:55  kumpf
// HP-BAPU: PEP-64 CIM Client and CIM Listener Java Interface
//
// Revision 1.1.1.1  2001/10/31 18:17:12  karl
// import of SNIA 0_7
//
// Revision 1.10  2001/01/07 16:52:21  davidsi
// - Added close() method.
//
// Revision 1.9  2000/11/06 19:01:19  davidsi
// - This is now an interface that defines what a web providing module
//   must implement (see HTTPOutputSimple/HTTPOutputHTTPClient for
//   examples).
//
//
//
package org.snia.wbemcmd.xml;

import java.io.*;
import java.util.*;
import java.net.*;
import org.snia.wbem.cim.CIMException;



/**
 * Writes text out over HTTP for the client
 */
public interface HTTPOutput 
{
   /**
    * setHostAndPort
    * 
    * @param ihostName
    *   The name of the host to connect to
    * @param iport
    *   The port to connect to
    */
    public void setHostAndPort( String ihostName,int iport );

    public void setHostURL( String protocol, String ihostName,int iport );

    public void setTimeout(int timeout);

    public int getTimeout();

   /**
    * Sets authentication details
    * 
    * @param userName
    *   The username
    * @param password
    *   Password for the user
    */
    public void authenticate( String userName, String password );
	

    public void println(String string) throws CIMException;

    public void makeHeader(String id) throws CIMException;	

    public void setMethod(String methodName)  throws CIMException;

    public void setObjectPath(String objPath) throws CIMException;
    
    public XMLNode sendRequest(String xMLPayload) throws CIMException;

    public void close() throws CIMException;

    public String getFeatures() throws CIMException;
	
}
