com.objectwave.socketClassServer
Class SocketClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--com.objectwave.customClassLoader.MultiClassLoader
              |
              +--com.objectwave.socketClassServer.SocketClassLoader

public class SocketClassLoader
extends MultiClassLoader

This will provide the ability to load classes over a TCPIP connection.

Version:
$Id: SocketClassLoader.java,v 2.0 2001/06/11 15:54:25 dave_hoag Exp $
Author:
dhoag

Field Summary
static java.lang.String contentRequest
           
static java.lang.String inputStreamRequest
           
 
Fields inherited from class com.objectwave.customClassLoader.MultiClassLoader
loadLocalClasses, monitorOn, sourceMonitorOn
 
Constructor Summary
SocketClassLoader()
          Constructor for the SocketClassLoader object
SocketClassLoader(ApplicationBootstrap root)
          Constructor for the SocketClassLoader object
SocketClassLoader(java.lang.String hostName, int port, ApplicationBootstrap root)
          Constructor for the SocketClassLoader object
 
Method Summary
 void close()
           
 java.lang.Object getContent(java.net.URL url)
          Actually, this is called from a CCLP Protocol Handler
 java.io.InputStream getInputStream(java.net.URL url)
          Actually, this is called from a CCLP Protocol Handler
 java.io.InputStream getResourceAsStream(java.lang.String str)
          Allows for this ClassLoader to provide class definitions.
protected  byte[] loadClassBytes(java.lang.String className)
          Must be implmented by subclass.
static void main(java.lang.String[] args)
          The main program for the SocketClassLoader class
 
Methods inherited from class com.objectwave.customClassLoader.MultiClassLoader
findClass, formatClassName, getResource, initPathInformation, loadClass, loadClass, loadLocalClassBytes, locateClass, lookForPreviousDefinitions, monitor, print, setClassNameReplacementChar, useLocalLoader
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contentRequest

public static final java.lang.String contentRequest
See Also:
Constant Field Values

inputStreamRequest

public static final java.lang.String inputStreamRequest
See Also:
Constant Field Values
Constructor Detail

SocketClassLoader

public SocketClassLoader()
                  throws java.io.IOException
Constructor for the SocketClassLoader object

Throws:
java.io.IOException

SocketClassLoader

public SocketClassLoader(ApplicationBootstrap root)
                  throws java.io.IOException
Constructor for the SocketClassLoader object

Parameters:
root -
Throws:
java.io.IOException

SocketClassLoader

public SocketClassLoader(java.lang.String hostName,
                         int port,
                         ApplicationBootstrap root)
                  throws java.io.IOException
Constructor for the SocketClassLoader object

Parameters:
hostName -
port -
root -
Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
The main program for the SocketClassLoader class

Parameters:
args - The command line arguments

getContent

public java.lang.Object getContent(java.net.URL url)
                            throws java.io.IOException
Actually, this is called from a CCLP Protocol Handler

Specified by:
getContent in class MultiClassLoader
Parameters:
url -
Returns:
The Content value
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream(java.net.URL url)
                                   throws java.io.IOException
Actually, this is called from a CCLP Protocol Handler

Specified by:
getInputStream in class MultiClassLoader
Parameters:
url -
Returns:
The InputStream value
Throws:
java.io.IOException

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String str)
Allows for this ClassLoader to provide class definitions.

Overrides:
getResourceAsStream in class MultiClassLoader
Parameters:
str -
Returns:
The ResourceAsStream value

close

public void close()

loadClassBytes

protected byte[] loadClassBytes(java.lang.String className)
Description copied from class: MultiClassLoader
Must be implmented by subclass. Use whatever means necesssary to return a byte[]. This is the only method needs to be implemented in most cases.

Specified by:
loadClassBytes in class MultiClassLoader
Parameters:
className -
Returns: