com.metamatrix.common.protocol.jar
Class JarURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by java.net.JarURLConnection
          extended by com.metamatrix.common.protocol.jar.JarURLConnection

public class JarURLConnection
extends java.net.JarURLConnection

Jar protocol connection class. The class extends the JDK provided JarURLConnection factory. However Jar protocol can not understand the teiid specific protocols like mmfile, mmrofile etc. The issue is if you can register application specific protocols during start-up using system properties the bulit in JAR protocol understands those protocols. However in the Teiid model this need to work by just dropping in in any container. This handler will be called for any class loaders registered with MetaMatrixURLStreamHandlerFactory, so that they understand the application specific protocols.


Field Summary
static java.net.URL DUMMY_URL
           
static java.lang.String PROTOCOL
           
 
Fields inherited from class java.net.JarURLConnection
jarFileURLConnection
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
protected JarURLConnection(java.net.URL url)
           
 
Method Summary
 void connect()
           
 java.util.jar.Attributes getAttributes()
           
 java.security.cert.Certificate[] getCertificates()
           
 int getContentLength()
           
 java.lang.String getEntryName()
           
 java.io.InputStream getInputStream()
           
 java.util.jar.JarEntry getJarEntry()
           
 java.util.jar.JarFile getJarFile()
           
 java.net.URL getJarFileURL()
           
 java.util.jar.Attributes getMainAttributes()
           
 java.util.jar.Manifest getManifest()
           
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOCOL

public static java.lang.String PROTOCOL

DUMMY_URL

public static java.net.URL DUMMY_URL
Constructor Detail

JarURLConnection

protected JarURLConnection(java.net.URL url)
                    throws java.net.MalformedURLException
Parameters:
url -
Throws:
java.net.MalformedURLException
Since:
4.3
Method Detail

getJarFileURL

public java.net.URL getJarFileURL()
Overrides:
getJarFileURL in class java.net.JarURLConnection
See Also:
JarURLConnection.getJarFileURL()

connect

public void connect()
             throws java.io.IOException
Specified by:
connect in class java.net.URLConnection
Throws:
java.io.IOException
Since:
4.3
See Also:
URLConnection.connect()

getJarFile

public java.util.jar.JarFile getJarFile()
                                 throws java.io.IOException
Specified by:
getJarFile in class java.net.JarURLConnection
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Overrides:
getInputStream in class java.net.URLConnection
Throws:
java.io.IOException
Since:
4.3
See Also:
URLConnection.getInputStream()

getContentLength

public int getContentLength()
Overrides:
getContentLength in class java.net.URLConnection

getAttributes

public java.util.jar.Attributes getAttributes()
                                       throws java.io.IOException
Overrides:
getAttributes in class java.net.JarURLConnection
Throws:
java.io.IOException
Since:
4.3
See Also:
JarURLConnection.getAttributes()

getCertificates

public java.security.cert.Certificate[] getCertificates()
                                                 throws java.io.IOException
Overrides:
getCertificates in class java.net.JarURLConnection
Throws:
java.io.IOException
Since:
4.3
See Also:
JarURLConnection.getCertificates()

getEntryName

public java.lang.String getEntryName()
Overrides:
getEntryName in class java.net.JarURLConnection
Since:
4.3
See Also:
JarURLConnection.getEntryName()

getJarEntry

public java.util.jar.JarEntry getJarEntry()
                                   throws java.io.IOException
Overrides:
getJarEntry in class java.net.JarURLConnection
Throws:
java.io.IOException
Since:
4.3
See Also:
JarURLConnection.getJarEntry()

getMainAttributes

public java.util.jar.Attributes getMainAttributes()
                                           throws java.io.IOException
Overrides:
getMainAttributes in class java.net.JarURLConnection
Throws:
java.io.IOException
Since:
4.3
See Also:
JarURLConnection.getMainAttributes()

getManifest

public java.util.jar.Manifest getManifest()
                                   throws java.io.IOException
Overrides:
getManifest in class java.net.JarURLConnection
Throws:
java.io.IOException
Since:
4.3
See Also:
JarURLConnection.getManifest()


Copyright © 2009. All Rights Reserved.