Skip navigation links


oracle.idm.connection
Class ConnectionGroup

java.lang.Object
  extended by oracle.idm.connection.ConnectionGroup

All Implemented Interfaces:
XmlPrintable

public final class ConnectionGroup
extends java.lang.Object
implements XmlPrintable

This class implements the connection group. Connection groups are place holders for connection delegates and stickers that reffer ot the related set of connection delegates.

Connection groups are used to associate related connection delegates that reffer to the same source-of-thruth. Typically all connection delegates that need to be used in tandem or can be used interchangeably with respect to the source-of-truth are grouped together into the same connection group.

If a connection group alredy belongs to the connection pool, synchronize all group operations with the pool in order to avoid dead-locks, as follows:

 synchronized (group.getConnectionPool()) { group.removeConnectionDelegate(delegate); }
 

Field Summary
protected  java.lang.String tag
          Tag used to print the connection group as an XML element.

 

Constructor Summary
ConnectionGroup()
          Constructor for the connection group.
ConnectionGroup(ConnectionDelegate delegate)
          Constructor for the connection group.
ConnectionGroup(ConnectionDelegate[] delegates)
          Constructor for the connection group.

 

Method Summary
 void addConnectionDelegate(ConnectionDelegate delegate)
          This method adds a connection delegate to the group.
 boolean containsConnectionDelegate(ConnectionDelegate delegate)
          Returns true if the group contains the specified connection delegate.
 boolean containsConnectionDelegates()
          Returns true if the group contains any connection delegates.
 boolean containsConnectionDelegates(java.util.Map parameters)
          Returns true if the group contains any connection delegates for the given parameters.
 boolean containsConnectionDelegates(java.lang.String type)
          Returns true if the group contains any connection delegates for the given connection type.
 boolean containsSticker(java.lang.String sticker)
          Returns true if this connection group contains the specified sticker.
 boolean containsStickers()
          Returns true if this connection group contains any sticker.
 boolean containsType(java.lang.String type)
          Returns true if the connection groups contains a delegate of the given type.
 java.util.Collection getConnectionDelegates()
          Returns the connection delegates for this group.
 java.util.Collection getConnectionDelegates(java.util.Map parameters)
          Returns the connection delegates for this group and the given parameters.
 java.util.Collection getConnectionDelegates(java.lang.String type)
          Returns the connection delegates for this group and the given connection type.
 Connection.Operation.CountInfo getConnectionOperationCountInfo()
          Returns connection operation count info for this connection group.
 Connection.Operation.CountInfo getConnectionOperationCountInfo(java.util.Map parameters)
          Returns connection operation count info for this connection group.
 Connection.Operation.CountInfo getConnectionOperationCountInfo(java.lang.String type)
          Returns connection operation count info for this connection group.
 java.util.Collection getConnectionOperationCountInfos()
          Returns connection operation count infos for this connection group.
 ConnectionPool getConnectionPool()
          Returns the connection pool of this group.
 int getGross()
          Getter for the gross of this group.
 int getGross(java.util.Map parameters)
          Getter for the gross of this group and the given parameters.
 int getGross(java.lang.String type)
          Getter for the gross of this groupand the given connection type.
 java.util.logging.Logger getLogger()
          This method returns the logger for this connection group.
 int getSize()
          Returns the group size.
 int getSize(java.util.Map parameters)
          Returns the group size of given parameters.
 int getSize(java.lang.String type)
          Returns the group size of given connection type.
 java.util.Collection getTypes()
          Getter for the connection types available in this group.
 boolean isEmpty()
          Returns true if the group is empty.
 boolean isForeignConnection(Connection connection)
          Returns true if the connection does not belong to this group.
 boolean isProxying()
          Getter for the proxying mode.
 boolean isProxying(java.util.Map parameters)
          Getter for the proxying mode for the given parameters.
 boolean isProxying(java.lang.String type)
          Getter for the proxying mode for the given connection type.
 boolean isStackTracing()
          Getter for the stack tracing mode.
 boolean isStackTracing(java.util.Map parameters)
          Getter for the stack tracing mode for the given parameters.
 boolean isStackTracing(java.lang.String type)
          Getter for the stack tracing mode for the given connection type.
 boolean isValidating()
          Getter for the validating mode.
 boolean isValidating(java.util.Map parameters)
          Getter for the validating mode for the given parameters.
 boolean isValidating(java.lang.String type)
          Getter for the validating mode for the given connection type.
 void removeConnectionDelegate(ConnectionDelegate delegate)
          This method removes a connection delefate from the group.
 void removeConnectionDelegates()
          This method removes all connection delefates from the group.
 void removeConnectionDelegates(java.util.Map parameters)
          This method removes connection delefates from the group given the parameters.
 void removeConnectionDelegates(java.lang.String type)
          This method removes connection delefates from the group given the connection type.
 void removeSticker(java.lang.String sticker)
          Removes the specified sticker from this connection group.
 void removeStickers()
          Removes all stickers from this connection group.
 void resetProxying()
          Resets the proxying mode.
 void resetProxying(java.util.Map parameters)
          Resets the proxying mode for the given parameters
 void resetProxying(java.lang.String type)
          Resets the proxying mode for the given connection type.
 void resetStackTracing()
          Resets the stack tracing mode.
 void resetStackTracing(java.util.Map parameters)
          Resets the stack tracing mode for the given parameters.
 void resetStackTracing(java.lang.String type)
          Resets the stack tracing mode for the given connection type.
 void resetValidating()
          Resets the validating mode.
 void resetValidating(java.util.Map parameters)
          Resets the validating mode for the given parameters.
 void resetValidating(java.lang.String type)
          Resets the validating mode for the given connection type.
 void setProxying(boolean proxying)
          Setter for the proxying mode.
 void setProxying(java.util.Map parameters, boolean proxying)
          Setter for the proxying mode for the given parameters
 void setProxying(java.lang.String type, boolean proxying)
          Setter for the proxying mode for the given connection type.
 void setStackTracing(boolean stackTracing)
          Setter for the stack tracing mode.
 void setStackTracing(java.util.Map parameters, boolean stackTracing)
          Setter for the stack tracing mode for the given parameters.
 void setStackTracing(java.lang.String type, boolean stackTracing)
          Setter for the stack tracing mode for the given connection type.
 void setValidating(boolean validating)
          Setter for the validating mode.
 void setValidating(java.util.Map parameters, boolean validating)
          Setter for the validating mode for the given parameters.
 void setValidating(java.lang.String type, boolean validating)
          Setter for the validating mode for the given connection type.
 boolean timeoutSticker(java.lang.String sticker)
          Times out the specified sticker if it has not been updated longer than the specified timeout.
 int timeoutStickers()
          Times out all stickers that have not been updated longer than the specified timeout.
 void xprint(XmlPrintWriter out)
          Prints connection group properties to the PrintWriter as an XML element.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

tag

protected java.lang.String tag
Tag used to print the connection group as an XML element.

Constructor Detail

ConnectionGroup

public ConnectionGroup()
Constructor for the connection group.

ConnectionGroup

public ConnectionGroup(ConnectionDelegate delegate)
Constructor for the connection group.

ConnectionGroup

public ConnectionGroup(ConnectionDelegate[] delegates)
Constructor for the connection group.

Method Detail

getLogger

public java.util.logging.Logger getLogger()
This method returns the logger for this connection group.
Returns:
connection group logger

getConnectionPool

public ConnectionPool getConnectionPool()
Returns the connection pool of this group.
Returns:
connection pool of this group

getSize

public int getSize()
Returns the group size.
Returns:
int representing the size

getSize

public int getSize(java.lang.String type)
Returns the group size of given connection type.
Returns:
int representing the size

getSize

public int getSize(java.util.Map parameters)
Returns the group size of given parameters.
Returns:
int representing the size

getTypes

public java.util.Collection getTypes()
Getter for the connection types available in this group.

This method collects the types of connection delegates.

Returns:
collection of connection types

containsType

public boolean containsType(java.lang.String type)
Returns true if the connection groups contains a delegate of the given type.

getGross

public int getGross()
Getter for the gross of this group.

This method sums up the gorsses of connection delegates.

Returns:
int representing the connection group gross

getGross

public int getGross(java.lang.String type)
Getter for the gross of this groupand the given connection type.

This method sums up the grosses of connection delegates.

Returns:
float representing the connection group load

getGross

public int getGross(java.util.Map parameters)
Getter for the gross of this group and the given parameters.

This method sums up the grosses of connection delegates.

Returns:
float representing the connection group load

isEmpty

public boolean isEmpty()
Returns true if the group is empty.
Returns:
true if the group is empty, false otherwise

getConnectionOperationCountInfos

public java.util.Collection getConnectionOperationCountInfos()
Returns connection operation count infos for this connection group.

This method returns a cllection of count infos for all connection tyes.

Returns:
a collection of count infos

getConnectionOperationCountInfo

public Connection.Operation.CountInfo getConnectionOperationCountInfo()
Returns connection operation count info for this connection group.

This method returns the count info for every connection tye.

Returns:
count info

getConnectionOperationCountInfo

public Connection.Operation.CountInfo getConnectionOperationCountInfo(java.lang.String type)
Returns connection operation count info for this connection group.

This method returns the count info for the given connection tye.

Returns:
count info

getConnectionOperationCountInfo

public Connection.Operation.CountInfo getConnectionOperationCountInfo(java.util.Map parameters)
Returns connection operation count info for this connection group.

This method returns the count info for the given parameters.

Returns:
count info

getConnectionDelegates

public java.util.Collection getConnectionDelegates()
Returns the connection delegates for this group.
Returns:
a collection of connection delegates

getConnectionDelegates

public java.util.Collection getConnectionDelegates(java.lang.String type)
Returns the connection delegates for this group and the given connection type.
Returns:
a collection of connection delegates

getConnectionDelegates

public java.util.Collection getConnectionDelegates(java.util.Map parameters)
Returns the connection delegates for this group and the given parameters.
Returns:
a collection of connection delegates

addConnectionDelegate

public void addConnectionDelegate(ConnectionDelegate delegate)
This method adds a connection delegate to the group.

removeConnectionDelegate

public void removeConnectionDelegate(ConnectionDelegate delegate)
This method removes a connection delefate from the group.

removeConnectionDelegates

public void removeConnectionDelegates()
This method removes all connection delefates from the group.

removeConnectionDelegates

public void removeConnectionDelegates(java.lang.String type)
This method removes connection delefates from the group given the connection type.

removeConnectionDelegates

public void removeConnectionDelegates(java.util.Map parameters)
This method removes connection delefates from the group given the parameters.

containsConnectionDelegate

public boolean containsConnectionDelegate(ConnectionDelegate delegate)
Returns true if the group contains the specified connection delegate.
Returns:
ture if the group contains connection delegate, false otherwise

containsConnectionDelegates

public boolean containsConnectionDelegates()
Returns true if the group contains any connection delegates.
Returns:
ture if the group contains connection delegates, false otherwise

containsConnectionDelegates

public boolean containsConnectionDelegates(java.lang.String type)
Returns true if the group contains any connection delegates for the given connection type.
Returns:
ture if the group contains connection delegates, false otherwise

containsConnectionDelegates

public boolean containsConnectionDelegates(java.util.Map parameters)
Returns true if the group contains any connection delegates for the given parameters.
Returns:
ture if the group contains connection delegates, false otherwise

isProxying

public boolean isProxying()
Getter for the proxying mode.

This method returns true if at least one of the connection delegates is proxying.

Returns:
true if this is a proxying group, false otherwise

isProxying

public boolean isProxying(java.lang.String type)
Getter for the proxying mode for the given connection type.

This method returns true if at least one of the connection delegates is proxying.

Returns:
true if this is a proxying group, false otherwise

isProxying

public boolean isProxying(java.util.Map parameters)
Getter for the proxying mode for the given parameters.

This method returns true if at least one of the connection delegates is proxying.

Returns:
true if this is a proxying group, false otherwise

setProxying

public void setProxying(boolean proxying)
                 throws java.lang.UnsupportedOperationException
Setter for the proxying mode.

This method attempts to set the proxying mode for each connection delegate. If one or more delegates do not support setting of the proxying mode, an UnsupportedOperationException will be trhown after all delegates have been asked to set their proxying mode.

Throws:
java.lang.UnsupportedOperationException

setProxying

public void setProxying(java.lang.String type,
                        boolean proxying)
                 throws java.lang.UnsupportedOperationException
Setter for the proxying mode for the given connection type.

This method attempts to set the proxying mode for each connection delegate. If one or more delegates do not support setting of the proxying mode, an UnsupportedOperationException will be trhown after all delegates have been asked to set their proxying mode.

Throws:
java.lang.UnsupportedOperationException

setProxying

public void setProxying(java.util.Map parameters,
                        boolean proxying)
                 throws java.lang.UnsupportedOperationException
Setter for the proxying mode for the given parameters

This method attempts to set the proxying mode for each connection delegate. If one or more delegates do not support setting of the proxying mode, an UnsupportedOperationException will be trhown after all delegates have been asked to set their proxying mode.

Throws:
java.lang.UnsupportedOperationException

resetProxying

public void resetProxying()
                   throws java.lang.UnsupportedOperationException
Resets the proxying mode.

This method attempts to reset the proxying mode for each connection delegate. If one or more delegates do not support resetting of the proxying mode, an UnsupportedOperationException will be trhown after all delegates have been asked to reset their proxying mode.

Throws:
java.lang.UnsupportedOperationException

resetProxying

public void resetProxying(java.lang.String type)
                   throws java.lang.UnsupportedOperationException
Resets the proxying mode for the given connection type.

This method attempts to reset the proxying mode for each connection delegate. If one or more delegates do not support resetting of the proxying mode, an UnsupportedOperationException will be trhown after all delegates have been asked to reset their proxying mode.

Throws:
java.lang.UnsupportedOperationException

resetProxying

public void resetProxying(java.util.Map parameters)
                   throws java.lang.UnsupportedOperationException
Resets the proxying mode for the given parameters

This method attempts to reset the proxying mode for each connection delegate. If one or more delegates do not support resetting of the proxying mode, an UnsupportedOperationException will be trhown after all delegates have been asked to reset their proxying mode.

Throws:
java.lang.UnsupportedOperationException

isValidating

public boolean isValidating()
Getter for the validating mode.

This method returns true if at least one of the connection delegates is validating.

Returns:
true if this is a validating group, false otherwise

isValidating

public boolean isValidating(java.lang.String type)
Getter for the validating mode for the given connection type.

This method returns true if at least one of the connection delegates is validating.

Returns:
true if this is a validating group, false otherwise

isValidating

public boolean isValidating(java.util.Map parameters)
Getter for the validating mode for the given parameters.

This method returns true if at least one of the connection delegates is validating.

Returns:
true if this is a validating group, false otherwise

setValidating

public void setValidating(boolean validating)
                   throws java.lang.UnsupportedOperationException
Setter for the validating mode.

This method attempts to set the validating mode for each connection delegate. If one or more delegates do not support setting of the validating mode, an UnsupportedOperationException will be trhown after all delegates have been asked to set their validating mode.

Throws:
java.lang.UnsupportedOperationException

setValidating

public void setValidating(java.lang.String type,
                          boolean validating)
                   throws java.lang.UnsupportedOperationException
Setter for the validating mode for the given connection type.

This method attempts to set the validating mode for each connection delegate. If one or more delegates do not support setting of the validating mode, an UnsupportedOperationException will be trhown after all delegates have been asked to set their validating mode.

Throws:
java.lang.UnsupportedOperationException

setValidating

public void setValidating(java.util.Map parameters,
                          boolean validating)
                   throws java.lang.UnsupportedOperationException
Setter for the validating mode for the given parameters.

This method attempts to set the validating mode for each connection delegate. If one or more delegates do not support setting of the validating mode, an UnsupportedOperationException will be trhown after all delegates have been asked to set their validating mode.

Throws:
java.lang.UnsupportedOperationException

resetValidating

public void resetValidating()
                     throws java.lang.UnsupportedOperationException
Resets the validating mode.

This method attempts to reset the validating mode for each connection delegate. If one or more delegates do not support resetting of the validating mode, an UnsupportedOperationException will be trhown after all delegates have been asked to reset their validating mode.

Throws:
java.lang.UnsupportedOperationException

resetValidating

public void resetValidating(java.lang.String type)
                     throws java.lang.UnsupportedOperationException
Resets the validating mode for the given connection type.

This method attempts to reset the validating mode for each connection delegate. If one or more delegates do not support resetting of the validating mode, an UnsupportedOperationException will be trhown after all delegates have been asked to reset their validating mode.

Throws:
java.lang.UnsupportedOperationException

resetValidating

public void resetValidating(java.util.Map parameters)
                     throws java.lang.UnsupportedOperationException
Resets the validating mode for the given parameters.

This method attempts to reset the validating mode for each connection delegate. If one or more delegates do not support resetting of the validating mode, an UnsupportedOperationException will be trhown after all delegates have been asked to reset their validating mode.

Throws:
java.lang.UnsupportedOperationException

isStackTracing

public boolean isStackTracing()
Getter for the stack tracing mode.

This method returns true if at least one of the connection delegates is stack tracing.

Returns:
true if this is a stack tracing group, false otherwise

isStackTracing

public boolean isStackTracing(java.lang.String type)
Getter for the stack tracing mode for the given connection type.

This method returns true if at least one of the connection delegates is stack tracing.

Returns:
true if this is a stack tracing group, false otherwise

isStackTracing

public boolean isStackTracing(java.util.Map parameters)
Getter for the stack tracing mode for the given parameters.

This method returns true if at least one of the connection delegates is stack tracing.

Returns:
true if this is a stack tracing group, false otherwise

setStackTracing

public void setStackTracing(boolean stackTracing)
Setter for the stack tracing mode.

This method sets the stack tracing mode for each connection delegate.


setStackTracing

public void setStackTracing(java.lang.String type,
                            boolean stackTracing)
Setter for the stack tracing mode for the given connection type.

This method sets the stack tracing mode for each connection delegate.


setStackTracing

public void setStackTracing(java.util.Map parameters,
                            boolean stackTracing)
Setter for the stack tracing mode for the given parameters.

This method sets the stack tracing mode for each connection delegate.


resetStackTracing

public void resetStackTracing()
Resets the stack tracing mode.

This method resets the stack tracing mode for each connection delegate.


resetStackTracing

public void resetStackTracing(java.lang.String type)
Resets the stack tracing mode for the given connection type.

This method resets the stack tracing mode for each connection delegate.


resetStackTracing

public void resetStackTracing(java.util.Map parameters)
Resets the stack tracing mode for the given parameters.

This method resets the stack tracing mode for each connection delegate.


isForeignConnection

public boolean isForeignConnection(Connection connection)
Returns true if the connection does not belong to this group.
Returns:
true if this is a foreign connection, false otherwise

containsSticker

public boolean containsSticker(java.lang.String sticker)
Returns true if this connection group contains the specified sticker.
Returns:
true if the connection group contains the sticker

containsStickers

public boolean containsStickers()
Returns true if this connection group contains any sticker.
Returns:
true if the connection delegate any stickers

removeSticker

public void removeSticker(java.lang.String sticker)
Removes the specified sticker from this connection group.

removeStickers

public void removeStickers()
Removes all stickers from this connection group.

timeoutSticker

public boolean timeoutSticker(java.lang.String sticker)
Times out the specified sticker if it has not been updated longer than the specified timeout.
Returns:
true if the sticker has timed out

timeoutStickers

public int timeoutStickers()
Times out all stickers that have not been updated longer than the specified timeout.
Returns:
the count of timed out stickers.

xprint

public void xprint(XmlPrintWriter out)
Prints connection group properties to the PrintWriter as an XML element.
Specified by:
xprint in interface XmlPrintable
Parameters:
out - PrintWriter for printing connection group propeties.

Skip navigation links