Class NDRConnection

java.lang.Object
org.dlese.dpc.ndr.connection.NDRConnection

public class NDRConnection extends Object
  • Constructor Details

  • Method Details

    • getKeyFile

      public File getKeyFile()
    • setKeyFile

      public void setKeyFile(File f)
    • getServer

      public String getServer()
      Get the server for this object.
      Returns:
      - the server for this object
    • setServer

      public void setServer(String _server)
      Set the server for this object.
      Parameters:
      _server - - the server
    • getAgentHandle

      public String getAgentHandle()
      Get the NDR agentHandle for this connection object.
      Returns:
      - the agent handle for this object.=
    • setAgentHandle

      public void setAgentHandle(String _handle)
      Set the NDR connection agentHandle for this object.
      Parameters:
      _handle -
    • getLastError

      public Exception getLastError()
      Returns:
    • isConnectionOK

      public boolean isConnectionOK()
      Determine if the server for this connection is responding and operational.
      Returns:
      - true if the connection is OK
    • getPrivateKeyObject

      public PrivateKey getPrivateKeyObject()
      Get the private key for this connection.
      Returns:
      - the PrivateKey object for this connection.
    • getConnection

      public String getConnection()
      Retrieve the URL for this connection.
      Returns:
      - the URL string for this connection
    • setConnection

      public void setConnection(String _url)
      Set the connection for this object give a url.
      Parameters:
      url -
    • setTimeout

      public void setTimeout(int millisecs)
    • connect

      public NDRAPIProxy connect()
      Connect via this NDR connection.
    • setCanonicalHeader

      public void setCanonicalHeader(boolean signed)
      Set the NDR specified canonical header for this connection. This will sign the object with the appropriate x-nsdl-auth property as required by the NDR API specification
      invalid @link
      {@link http://ndr.comm.nsdl.com
      }.
      Parameters:
      signed - - set the canonical x-ndsl-auth property or not
    • getCanonicalHeader

      public String getCanonicalHeader()
      Get the canonical header for this connection object.
      Returns:
      - the canonical header
    • getSignedHeader

      public String getSignedHeader()
      Get the signed header ( canonical + x-nsdl-auth ).
      Returns:
      - the signed header
    • getHeaderValue

      public String getHeaderValue(String key)
      Get a header value for the given key.
      Parameters:
      key - - the key of interest
      Returns:
      - the value for that key
    • setContent

      public void setContent(String _requestContent)
    • getContent

      public String getContent()
    • requestGET

      public String requestGET(String _content)
    • requestGET

      public String requestGET(String _content, boolean _withParameters)
    • request

      public String request() throws Exception
      Throws:
      Exception
    • request

      public String request(String _content) throws Exception
      Throws:
      Exception