//
// PlainSocketProvider.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 PlainSocketProvider.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: PlainSocketProvider.java,v 1.1 2003/07/17 18:32:55 kumpf Exp $
//


package org.snia.wbemcmd.xml;

import java.io.*;
import java.net.*;

/**
   PlainSocketProvider provides non SSL(plain) socket connection 
   to CIM Server and Clients.

   @ see java.net.ServerSocket
   @ see java.net.Socket
*/
public class PlainSocketProvider extends SocketProvider 
{
    public String getHTTPType()
    {
	return "http"; // HTTP over plain sockets
    }

    public Socket createSocket(InetAddress addr, int port) 
	throws IOException, CannotCreateSocketException 
    {
	return new Socket(addr,port);
    }

    public ServerSocket createServerSocket(int port, int backlog) 
	throws IOException, CannotCreateSocketException 
    {
	return new ServerSocket(port,backlog);
    }
    
    public Socket createSocketWrapper(Socket s, String host,int port) 
	throws IOException, CannotCreateSocketException 
    {
	throw new IOException("Socket Wrapper not supported for plain sockets");
    }
}
