Class ODCConnectionTransport
- java.lang.Object
-
- org.owasp.dependencycheck.data.ossindex.ODCConnectionTransport
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.sonatype.ossindex.service.client.transport.Transport
public class ODCConnectionTransport extends java.lang.Object implements org.sonatype.ossindex.service.client.transport.Transport
ODC connection transport is used instead of HttpUrlConnectionTransport because the proxy information is already configured.- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description ODCConnectionTransport(org.sonatype.ossindex.service.client.OssindexClientConfiguration config, org.sonatype.ossindex.service.client.transport.UserAgentSupplier userAgent)
Constructs a new transport object to connect to the OSS Index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
init(org.sonatype.ossindex.service.client.OssindexClientConfiguration configuration)
java.lang.String
post(java.net.URI url, java.lang.String payloadType, java.lang.String payload, java.lang.String acceptType)
-
-
-
Constructor Detail
-
ODCConnectionTransport
public ODCConnectionTransport(org.sonatype.ossindex.service.client.OssindexClientConfiguration config, org.sonatype.ossindex.service.client.transport.UserAgentSupplier userAgent)
Constructs a new transport object to connect to the OSS Index.- Parameters:
config
- the OSS client configurationuserAgent
- the user agent to send to OSS Index
-
-
Method Detail
-
init
public void init(org.sonatype.ossindex.service.client.OssindexClientConfiguration configuration)
- Specified by:
init
in interfaceorg.sonatype.ossindex.service.client.transport.Transport
-
post
public java.lang.String post(java.net.URI url, java.lang.String payloadType, java.lang.String payload, java.lang.String acceptType) throws org.sonatype.ossindex.service.client.transport.Transport.TransportException, java.io.IOException
- Specified by:
post
in interfaceorg.sonatype.ossindex.service.client.transport.Transport
- Throws:
org.sonatype.ossindex.service.client.transport.Transport.TransportException
java.io.IOException
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-