com.appdynamics.eumagent.runtime
Class CollectorChannel

java.lang.Object
  extended by com.appdynamics.eumagent.runtime.CollectorChannel

public abstract class CollectorChannel
extends java.lang.Object

Class for customizing the connection between the agent SDK and the collector.


Constructor Summary
CollectorChannel()
           
 
Method Summary
 void addRequestProperty(java.lang.String property, java.lang.String value)
          Adds a header to the request.
 int getConnectTimeout()
           
abstract  java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderFields()
          Sends the request, if it hasn't been sent already, and returns the response headers.
abstract  java.io.InputStream getInputStream()
          Sends the request, if it hasn't been sent already, and opens a stream for reading the response body.
abstract  java.io.OutputStream getOutputStream()
          Opens a stream for writing a request body.
 int getReadTimeout()
           
 java.lang.String getRequestMethod()
           
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestProperties()
           
abstract  int getResponseCode()
          Sends the request, if it hasn't been sent already, and returns the response status code.
 java.net.URL getURL()
           
 void setConnectTimeout(int connectTimeout)
          Sets the timeout, in milliseconds, for establishing a connection to the collector.
 void setReadTimeout(int readTimeout)
          Sets the timeout, in milliseconds, for reading data from the collector.
 void setRequestMethod(java.lang.String requestMethod)
          Sets the HTTP method used to make the request.
 void setURL(java.net.URL url)
          Sets the URL to which the request should be sent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectorChannel

public CollectorChannel()
Method Detail

setURL

public void setURL(java.net.URL url)
Sets the URL to which the request should be sent.


getURL

public java.net.URL getURL()

setConnectTimeout

public void setConnectTimeout(int connectTimeout)
Sets the timeout, in milliseconds, for establishing a connection to the collector.


getConnectTimeout

public int getConnectTimeout()

setReadTimeout

public void setReadTimeout(int readTimeout)
Sets the timeout, in milliseconds, for reading data from the collector.


getReadTimeout

public int getReadTimeout()

addRequestProperty

public void addRequestProperty(java.lang.String property,
                               java.lang.String value)
Adds a header to the request.

Parameters:
property - The name of the header.
value - The value of the header.

getRequestProperties

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestProperties()

setRequestMethod

public void setRequestMethod(java.lang.String requestMethod)
Sets the HTTP method used to make the request.

Parameters:
requestMethod - The request method, such as "GET" or "POST".

getRequestMethod

public java.lang.String getRequestMethod()

getOutputStream

public abstract java.io.OutputStream getOutputStream()
                                              throws java.io.IOException
Opens a stream for writing a request body.

Throws:
java.io.IOException - If an I/O error occurs.

getInputStream

public abstract java.io.InputStream getInputStream()
                                            throws java.io.IOException
Sends the request, if it hasn't been sent already, and opens a stream for reading the response body.

Throws:
java.io.IOException - If an I/O error occurs.

getResponseCode

public abstract int getResponseCode()
                             throws java.io.IOException
Sends the request, if it hasn't been sent already, and returns the response status code.

Throws:
java.io.IOException - If an I/O error occurs.

getHeaderFields

public abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderFields()
                                                                                          throws java.io.IOException
Sends the request, if it hasn't been sent already, and returns the response headers.

Throws:
java.io.IOException - If an I/O error occurs.