@ Override public boolean areEndPointsEqual ( Object ep1 , Object ep2 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "areEndPointsEqual" , new Object [ ] { ep1 , ep2 } ) ; boolean isEqual = false ; if ( ep1 instanceof CFEndPoint && ep2 instanceof CFEndPoint ) { CFEndPoint cfEp1 = ( CFEndPoint ) ep1 ; CFEndPoint cfEp2 = ( CFEndPoint ) ep2 ; // The CFW does not provide an equals method for its endpoints. // We need to manually equals the important bits up isEqual = isEqual ( cfEp1 . getAddress ( ) , cfEp2 . getAddress ( ) ) && isEqual ( cfEp1 . getName ( ) , cfEp2 . getName ( ) ) && cfEp1 . getPort ( ) == cfEp2 . getPort ( ) && cfEp1 . isLocal ( ) == cfEp2 . isLocal ( ) && cfEp1 . isSSLEnabled ( ) == cfEp2 . isSSLEnabled ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "areEndPointsEqual" , Boolean . valueOf ( isEqual ) ) ; return isEqual ; }
The channel framework EP s don t have their own equals method - so one is implemented here by comparing the various parts of the EP .