JCas
v0.3.1

cas
Class JCasClient

java.lang.Object
  extended bycas.JCasClient

public class JCasClient
extends Object

Tries to authenticate against a CAS Server.

Version:
1.0
Author:
Ralph Schuster

Field Summary
protected  String agent
          The agent
protected  boolean closeConnection
          The doClose for the connection
protected  String password
          The password
protected  int port
          The port to contact
protected  String requestCookie
          The request cookie
protected  JCasResponseTag response
          The response from the server.
protected  String scheme
          The scheme name
protected  String server
          The server to contact
protected  Socket socket
          The socket of the connection
protected  String user
          The user
protected  boolean useSSL
          Whether to use SSL
 
Constructor Summary
JCasClient()
          Creates a new instance of JCasClient
 
Method Summary
 void close()
          Closes the connection.
 void doRequest()
          Actually does the request.
 String getAgent()
           
 boolean getCloseConnection()
           
 String getErrorCode()
           
 String getErrorMessage()
           
 String getPassword()
           
 int getPort()
           
 String getRequestCookie()
           
 String getResponseCookie()
           
 boolean getReturnCode()
           
 String getScheme()
           
 String getServer()
           
 String getServerName()
           
 String getUser()
           
 boolean isConnected()
          Returns true if client is connected.
 boolean isSSL()
           
static void main(String[] args)
           
 void setAgent(String agent)
           
 void setCloseConnection(boolean b)
           
 void setPassword(String password)
           
 void setPort(int port)
           
 void setRequestCookie(String cookie)
           
 void setScheme(String scheme)
           
 void setServer(String server)
           
 void setSSL(boolean useSSL)
           
 void setUser(String user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socket

protected Socket socket
The socket of the connection


server

protected String server
The server to contact


port

protected int port
The port to contact


scheme

protected String scheme
The scheme name


user

protected String user
The user


password

protected String password
The password


agent

protected String agent
The agent


requestCookie

protected String requestCookie
The request cookie


closeConnection

protected boolean closeConnection
The doClose for the connection


response

protected JCasResponseTag response
The response from the server.


useSSL

protected boolean useSSL
Whether to use SSL

Constructor Detail

JCasClient

public JCasClient()
Creates a new instance of JCasClient

Method Detail

setServer

public void setServer(String server)

getServer

public String getServer()

setPort

public void setPort(int port)

getPort

public int getPort()

setScheme

public void setScheme(String scheme)

setUser

public void setUser(String user)

setPassword

public void setPassword(String password)

setAgent

public void setAgent(String agent)

setRequestCookie

public void setRequestCookie(String cookie)

setCloseConnection

public void setCloseConnection(boolean b)

isSSL

public boolean isSSL()

setSSL

public void setSSL(boolean useSSL)

getScheme

public String getScheme()

getUser

public String getUser()

getPassword

public String getPassword()

getAgent

public String getAgent()

getRequestCookie

public String getRequestCookie()

getCloseConnection

public boolean getCloseConnection()

getResponseCookie

public String getResponseCookie()
                         throws IOException
Throws:
IOException

getServerName

public String getServerName()
                     throws IOException
Throws:
IOException

getReturnCode

public boolean getReturnCode()
                      throws IOException
Throws:
IOException

getErrorMessage

public String getErrorMessage()
                       throws IOException
Throws:
IOException

getErrorCode

public String getErrorCode()
                    throws IOException
Throws:
IOException

isConnected

public boolean isConnected()
Returns true if client is connected.


doRequest

public void doRequest()
               throws IOException
Actually does the request.

Throws:
IOException

close

public void close()
Closes the connection.


main

public static void main(String[] args)
Parameters:
args - the command line arguments

JCas
v0.3.1