//
// SocketProvider.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 SocketProvider.java
// 
// The Initial Developer of the Original Code is Viktor Mihajlovski.
//
// 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: SocketProvider.java,v 1.1 2003/07/17 18:32:55 kumpf Exp $
//
// $Log: SocketProvider.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:22  karl
// import of SNIA 0_7
//
// Revision 1.1  2001/06/23 11:31:37  davidsi
// - Support for SSL.
//
//
//

package org.snia.wbemcmd.xml;

import java.io.*;
import java.net.*;
import org.snia.wbemcmd.utils.*;
import org.snia.wbemcfg.GlobalConfig;

/**
   SocketProvider is an abstract class that provides an interface
   for plain(no SSL) and SSL sockets to CIM Server and Clients.
   JSSESocketProvider and PlainSocketProvider extend this class
   to provide appropriate connection funcationality.
 */

public abstract class SocketProvider 
{
    private static SocketProvider sp = null; 

    public static SocketProvider getProvider() 
    {
	return sp;
    }

    public abstract String getHTTPType();

    public abstract Socket createSocket(InetAddress addr, int port) 
	throws IOException, CannotCreateSocketException;
    
    public abstract ServerSocket createServerSocket(int port, int backlog) 
	throws IOException, CannotCreateSocketException;

    public abstract Socket createSocketWrapper(Socket s, String host, int port) 
	throws IOException, CannotCreateSocketException;
}
