jPOS 1.6.1 API Documentation

org.jpos.core
Class CardAgentLookup

java.lang.Object
  extended by org.jpos.core.CardAgentLookup

public class CardAgentLookup
extends java.lang.Object

Since:
jPOS 1.1 Singleton in charge of registering and further locating Agents
Version:
$Id: CardAgentLookup.java 2594 2008-01-22 16:41:31Z apr $
Author:
apr@cs.com.uy
See Also:
CardAgent, CardTransaction

Method Summary
static void add(CardAgent agent)
          register an Agent (at the end of the list)
static CardAgent getAgent(byte[] b)
          locate an agent giving a transaction Image
static CardAgent getAgent(CardTransaction t)
          locate an agent able to process a given CardTransaction
static CardAgent getAgent(java.lang.Class t)
          locate an agent of a given class
static CardAgent getAgent(int id)
          locate an agent giving its unique agent ID
static CardAgent getAgent(java.lang.String name)
          locate an agent giving its class Name
static CardAgent[] getAgents()
           
static CardAgent[] getAgents(CardTransaction t)
          locate agent able to process a given CardTransaction
static void remove(CardAgent agent)
          remove all ocurrences of agent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public static void add(CardAgent agent)
register an Agent (at the end of the list)

Parameters:
agent - Agent to add

remove

public static void remove(CardAgent agent)
remove all ocurrences of agent

Parameters:
agent - Agent to remove

getAgents

public static CardAgent[] getAgents()
Returns:
all available agents

getAgents

public static CardAgent[] getAgents(CardTransaction t)
locate agent able to process a given CardTransaction

Parameters:
t - CardTransaction holding an Operation to be performed
Returns:
suitable array of agents

getAgent

public static CardAgent getAgent(java.lang.String name)
                          throws CardAgentNotFoundException
locate an agent giving its class Name

Parameters:
class - name
Returns:
given agent
Throws:
CardAgentNotFoundException

getAgent

public static CardAgent getAgent(int id)
                          throws CardAgentNotFoundException
locate an agent giving its unique agent ID

Parameters:
id -
Returns:
given agent
Throws:
CardAgentNotFoundException

getAgent

public static CardAgent getAgent(byte[] b)
                          throws CardAgentNotFoundException
locate an agent giving a transaction Image

Parameters:
b - a transaction image
Returns:
given agent
Throws:
CardAgentNotFoundException

getAgent

public static CardAgent getAgent(java.lang.Class t)
                          throws CardAgentNotFoundException
locate an agent of a given class

Parameters:
class -
Returns:
given agent
Throws:
CardAgentNotFoundException

getAgent

public static CardAgent getAgent(CardTransaction t)
                          throws CardAgentNotFoundException
locate an agent able to process a given CardTransaction

Parameters:
t - CardTransaction holding an Operation to be performed
Returns:
suitable agent
Throws:
CardAgentNotFoundException

jPOS.org