issrg.utils.message
Class Client

java.lang.Object
  extended by issrg.utils.message.Client

public class Client
extends java.lang.Object

this is a message processor, which receives a WS-Trust security token request, an XACML request context or a SAML authz request and returns an XACML request context, an XACML response context or a SAML authz response respectively.

Author:
Linying Su

Field Summary
static int API
           
static int WS_SERVICE
           
 
Constructor Summary
Client(int type, int format, java.lang.String policy, java.lang.String soa, java.lang.String oid, java.lang.String acattribute, java.lang.String pkcattribute, java.lang.String rootca, java.lang.String url)
          this is to construct an object for calling the PERMIS API.
Client(java.lang.String config)
          this class defines an object, which can receive three types of messages.
Client(java.lang.String log, int type, int format, java.lang.String policy, java.lang.String soa, java.lang.String oid, java.lang.String acattribute, java.lang.String pkcattribute, java.lang.String rootca, java.lang.String url)
          this is to construct an object for calling the PERMIS API.
Client(java.lang.String config, java.lang.String log)
          this class defines an object, which can receive three types of messages.
Client(java.net.URL url)
          this is to construct an object for calling the PERMIS web service.
Client(java.net.URL url, java.lang.String log)
          this is to construct an object for calling the PERMIS web service.
 
Method Summary
 void login()
          if the keystore type is JKS, then the keystore is a trust store; otherwise, it is a key pair of the client in the format of PKCS12
 void login(java.lang.String file, java.lang.String type, java.lang.String pass)
           
 org.w3c.dom.Element process(org.w3c.dom.Element message)
          this method is used to process a message and return a resonse.
 java.lang.String process(java.lang.String messageIn)
          this method is used to process a message and return a resonse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WS_SERVICE

public static final int WS_SERVICE
See Also:
Constant Field Values

API

public static final int API
See Also:
Constant Field Values
Constructor Detail

Client

public Client(java.lang.String config)
       throws MessageException
this class defines an object, which can receive three types of messages. this is to construct an object for calling the PERMIS API.

Parameters:
config - is the file name for configuring PERMIS.
Throws:
MessageException

Client

public Client(java.lang.String config,
              java.lang.String log)
       throws MessageException
this class defines an object, which can receive three types of messages. this is to construct an object for calling the PERMIS API.

Parameters:
config - is the file name for configuring PERMIS.
log - is the file name for configuring the log system in the client side.
Throws:
MessageException

Client

public Client(java.net.URL url)
       throws MessageException
this is to construct an object for calling the PERMIS web service.

Parameters:
url - is the URL of the service.
Throws:
MessageException

Client

public Client(java.net.URL url,
              java.lang.String log)
       throws MessageException
this is to construct an object for calling the PERMIS web service.

Parameters:
url - is the URL of the service.
log - is the file name for configuring the log system in the client side.
Throws:
MessageException

Client

public Client(int type,
              int format,
              java.lang.String policy,
              java.lang.String soa,
              java.lang.String oid,
              java.lang.String acattribute,
              java.lang.String pkcattribute,
              java.lang.String rootca,
              java.lang.String url)
       throws MessageException
this is to construct an object for calling the PERMIS API.

Parameters:
type - indicates whether the policy parameter (i.e. the fourth parameter) contains a policy (i.e. POLICY_BINARY)or is a policy file (POLICY_PATH).
format - indicates what format the policy is in; AC_POLICY or XML_POLICY.
policy - is an either policy string or policy file path. base64 encoded if it is an AC_POLICY.
soa - is the Source Of Authority identified by a LDAP DN, who holds and issues the policy.
oid - is the policy name.
acattribute - is the field name, where the attribute certificate is stored.
pkcattribute - is the field name, where the pkc attribute certificate is stored.
rootca - is the root CA PKC file path. if this parameter is set then signature verificateion is on.
url - is the URL of a repository, where ACs and PKCs are stored.
Throws:
MessageException

Client

public Client(java.lang.String log,
              int type,
              int format,
              java.lang.String policy,
              java.lang.String soa,
              java.lang.String oid,
              java.lang.String acattribute,
              java.lang.String pkcattribute,
              java.lang.String rootca,
              java.lang.String url)
       throws MessageException
this is to construct an object for calling the PERMIS API.

Parameters:
log - is the file name for configuring the log system.
type - indicates whether the policy parameter (i.e. the fourth parameter) contains a policy (i.e. POLICY_BINARY)or is a policy file (POLICY_PATH).
format - indicates what format the policy is in; AC_POLICY or XML_POLICY.
policy - is an either policy string or policy file path. base64 encoded if it is an AC_POLICY.
soa - is the Source Of Authority identified by a LDAP DN, who holds and issues the policy.
oid - is the policy name.
acattribute - is the field name, where the attribute certificate is stored.
pkcattribute - is the field name, where the pkc attribute certificate is stored.
rootca - is the root CA PKC file path. if this parameter is set then signature verificateion is on.
url - is the URL of a repository, where ACs and PKCs are stored.
Throws:
MessageException
Method Detail

process

public org.w3c.dom.Element process(org.w3c.dom.Element message)
                            throws MessageException
this method is used to process a message and return a resonse.

Parameters:
message - is the message, which is processed according to its type.
Throws:
MessageException

process

public java.lang.String process(java.lang.String messageIn)
                         throws MessageException
this method is used to process a message and return a resonse.

Parameters:
messageIn - is the message, which is processed according to its type.
Throws:
MessageException

login

public void login()
           throws MessageException
if the keystore type is JKS, then the keystore is a trust store; otherwise, it is a key pair of the client in the format of PKCS12

Throws:
MessageException

login

public void login(java.lang.String file,
                  java.lang.String type,
                  java.lang.String pass)
           throws MessageException
Throws:
MessageException