FileDocCategorySizeDatePackage
OutboundResourceAdapter.javaAPI DocGlassfish v2 API14514Fri May 04 22:31:22 BST 2007com.sun.enterprise.deployment

OutboundResourceAdapter

public class OutboundResourceAdapter extends Descriptor
Deployment Information for connector outbound-resourceadapter
author
Qingqing Ouyang
author
Sheetal Vartak

Fields Summary
private boolean
isDirty
private int
transactionSupport
private Set
authMechanisms
private boolean
reauthenticationSupport
private Set
connectionDefs
Constructors Summary
public OutboundResourceAdapter()


       
    
    	this.authMechanisms      = new OrderedSet();
	this.connectionDefs = new OrderedSet();
    
Methods Summary
public booleanaddAuthMechanism(AuthMechanism mech)
Add a AuthMechanism object to the set return value : false = found true = not found

        boolean flag=false;
        for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){
	    AuthMechanism next = (AuthMechanism) itr.next();
	    if (next.getAuthMechVal()==mech.getAuthMechVal()) {  
	        return(flag);
	    }
	}	    
	flag=this.authMechanisms.add(mech);
	this.setDirty();
	this.changed();
	return(flag);
    
public booleanaddAuthMechanism(int mech)
Add a AuthMechanism object with given auth mech value to the set return value : false = found true = not found

        boolean flag = false;
        for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){
	    AuthMechanism next = (AuthMechanism) itr.next();
	    if (next.getAuthMechVal() == mech)
	       return(flag);
	}	    
        String credInf = null;
        if (mech == PoolManagerConstants.BASIC_PASSWORD) {
            credInf = PoolManagerConstants.PASSWORD_CREDENTIAL;
        } else {
            credInf = PoolManagerConstants.GENERIC_CREDENTIAL;
        }
	AuthMechanism auth = new AuthMechanism("",mech, credInf);
        flag = this.authMechanisms.add(auth);
	this.setDirty();
        this.changed();
	return(flag);
    
public voidaddConfigProperty(EnvironmentProperty configProperty)
Add a configProperty to the set

	getConnectionDef().getConfigProperties().add(configProperty);
    
public voidaddConnectionDefDescriptor(ConnectionDefDescriptor conDefDesc)
adds an entry to the set of connection definitions

	this.connectionDefs.add(conDefDesc);
	this.setDirty();
	this.changed();
    
public voidchanged()

	super.changed();
    
public java.util.SetgetAuthMechanisms()
Set of AuthMechanism objects

        if (authMechanisms == null) {
            authMechanisms = new OrderedSet();
        }
        return authMechanisms;
    
public java.util.SetgetConfigProperties()
Set of EnvironmentProperty

        return getConnectionDef().getConfigProperties();
    
public ConnectionDefDescriptorgetConnectionDef()

	Iterator iter = connectionDefs.iterator(); 
	ConnectionDefDescriptor conDef = (ConnectionDefDescriptor)iter.next();
	return conDef;
    
public java.util.SetgetConnectionDefs()
returns the set of connection definitions

	return connectionDefs;
    
public java.lang.StringgetConnectionFactoryImpl()
Get connection factory impl

        return getConnectionDef().getConnectionFactoryImpl();
    
public java.lang.StringgetConnectionFactoryIntf()
Get connection factory intf

        return getConnectionDef().getConnectionFactoryIntf();
    
public java.lang.StringgetConnectionImpl()
Get connection impl

        return getConnectionDef().getConnectionImpl();
    
public java.lang.StringgetConnectionIntf()
Get connection intf

        return getConnectionDef().getConnectionIntf();
    
public java.lang.StringgetManagedConnectionFactoryImpl()
Gets the value of ManagedconnectionFactoryImpl

        return getConnectionDef().getManagedConnectionFactoryImpl();
    
public java.lang.StringgetReauthenticationSupport()

        return String.valueOf(reauthenticationSupport);
    
public java.lang.StringgetTransSupport()
Returns NO_TRANSACTION, LOCAL_TRANSACTION, XA_TRANSACTION as defined in PoolManagerConstants interface

        if (transactionSupport == PoolManagerConstants.NO_TRANSACTION)
	    return ConnectorTagNames.DD_NO_TRANSACTION;
	else if (transactionSupport == PoolManagerConstants.LOCAL_TRANSACTION)
            return ConnectorTagNames.DD_LOCAL_TRANSACTION;
	else 
            return ConnectorTagNames.DD_XA_TRANSACTION;
    
public intgetTransactionSupport()

        return transactionSupport;
    
public booleanisDirty()

	return this.isDirty;
    
public booleanremoveAuthMechanism(AuthMechanism mech)
Remove a AuthMechanism object to the set return value : false = found true = not found

        boolean flag=false;
        for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){
	    AuthMechanism next = (AuthMechanism) itr.next();
	    if (next.equals(mech)) {
	        flag=this.authMechanisms.remove(mech);
		this.setDirty();
	        this.changed();
		return(flag);
	    }
	}
	return(flag);
    
public booleanremoveAuthMechanism(int mech)
Remove a AuthMechanism object with given auth mech value from the set return value : false = found true = not found

        boolean flag = false;
        for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){
	    AuthMechanism next = (AuthMechanism) itr.next();	   
	    if (next.getAuthMechVal()==mech)
	    {
	        flag = this.authMechanisms.remove(next);
		this.setDirty();
	        this.changed();
                return(flag);
	    }
	}
	return(flag);
    
public voidremoveConfigProperty(EnvironmentProperty configProperty)
Add a configProperty to the set

	getConnectionDef().getConfigProperties().remove(configProperty);
    
public voidremoveConnectionDefDescriptor(ConnectionDefDescriptor conDefDesc)
removes an entry from the set of connection definitions

	this.connectionDefs.remove(conDefDesc);
	this.setDirty();
	this.changed();
    
public voidsetConnectionDef(ConnectionDefDescriptor conDef)
For being able to read 1.0 and write 1.5

	    this.connectionDefs.add(conDef);
	    this.setDirty();
	    this.changed();
	
public voidsetConnectionFactoryImpl(java.lang.String cf)
set connection factory impl

	getConnectionDef().setConnectionFactoryImpl(cf);
    
public voidsetConnectionFactoryIntf(java.lang.String cf)
set connection factory intf

	getConnectionDef().setConnectionFactoryIntf(cf);
    
public voidsetConnectionImpl(java.lang.String con)
set connection intf

	getConnectionDef().setConnectionImpl(con);
    
public voidsetConnectionIntf(java.lang.String con)
set connection intf

	getConnectionDef().setConnectionIntf(con);
    
private voidsetDirty()

        this.isDirty = true;
    
public voidsetManagedConnectionFactoryImpl(java.lang.String managedConnectionFactoryImpl)
Sets the value of ManagedconnectionFactoryImpl

        getConnectionDef().setManagedConnectionFactoryImpl(managedConnectionFactoryImpl);
    
public voidsetReauthenticationSupport(boolean reauthenticationSupport)
Sets the value of supportsReauthentication

        this.reauthenticationSupport = reauthenticationSupport;
	this.setDirty();
        this.changed();
    
public voidsetReauthenticationSupport(java.lang.String reauthSupport)
sets the value of supportsReauthentication DOL rearchitecture

        this.reauthenticationSupport = 
	    (Boolean.valueOf(reauthSupport)).booleanValue();
	this.setDirty();
	this.changed();
    
public voidsetTransactionSupport(int transactionSupport)
Set value of transactionSupport to NO_TRANSACTION, LOCAL_TRANSACTION, XA_TRANSACTION as defined in PoolManagerConstants interface

        this.transactionSupport = transactionSupport;
	this.setDirty();
        this.changed();
    
public voidsetTransactionSupport(java.lang.String support)
Set value of transactionSupport to NO_TRANSACTION, LOCAL_TRANSACTION, XA_TRANSACTION as defined in PoolManagerConstants interface

        if (ConnectorTagNames.DD_NO_TRANSACTION.equals(support))
            this.transactionSupport = PoolManagerConstants.NO_TRANSACTION;
        else if (ConnectorTagNames.DD_LOCAL_TRANSACTION.equals(support))
            this.transactionSupport = PoolManagerConstants.LOCAL_TRANSACTION;
        else
            this.transactionSupport = PoolManagerConstants.XA_TRANSACTION;

	this.setDirty();
        this.changed();
    
public booleansupportsReauthentication()
Gets the value of supportsReauthentication

        return reauthenticationSupport;