idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
39,900 | private static boolean isIPv6Addr ( String host ) { if ( host != null ) { if ( host . contains ( "[" ) && host . contains ( "]" ) ) host = host . substring ( host . indexOf ( "[" ) + 1 , host . indexOf ( "]" ) ) ; host = host . toLowerCase ( ) ; Pattern p1 = Pattern . compile ( "^(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1... | Is the address an IPv6 Address . |
39,901 | public TimedDirContext reCreateDirContext ( TimedDirContext oldCtx , String errorMessage ) throws WIMSystemException { final String METHODNAME = "DirContext reCreateDirContext(String errorMessage)" ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHODNAME + " Communication exception occurs: " + errorMessage + " C... | Recreate a Directory context where the oldContext failed with the given error message . |
39,902 | @ FFDCIgnore ( NamingException . class ) public void releaseDirContext ( TimedDirContext ctx ) throws WIMSystemException { final String METHODNAME = "releaseDirContext" ; if ( iContextPoolEnabled ) { synchronized ( iLock ) { if ( iContexts . size ( ) >= iPrefPoolSize || ( iMaxPoolSize != 0 && iLiveContexts > iMaxPoolSi... | Release the given directory context . |
39,903 | public void getTraceSummaryLine ( StringBuilder buff ) { buff . append ( getControlMessageType ( ) . toString ( ) . trim ( ) ) ; buff . append ( ":flags=0x" ) ; buff . append ( Integer . toHexString ( getFlags ( ) & 0xff ) ) ; } | Get the common prefix for all control message summary lines |
39,904 | protected static void appendArray ( StringBuilder buff , String name , String [ ] values ) { buff . append ( ',' ) ; buff . append ( name ) ; buff . append ( "=[" ) ; if ( values != null ) { for ( int i = 0 ; i < values . length ; i ++ ) { if ( i != 0 ) buff . append ( ',' ) ; buff . append ( values [ i ] ) ; } } buff ... | Helper method to append a string array to a summary string method |
39,905 | public void init ( InputStream in ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "init" , "init" ) ; } this . in = in ; next ( ) ; obs = null ; } | Initializes the servlet input stream with the specified raw input stream . |
39,906 | public void next ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "next" , "next" ) ; } length = - 1 ; limit = Long . MAX_VALUE ; total = 0 ; count = 0 ; pos = 0 ; } | Begins reading the next request . |
39,907 | public void finish ( ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "finish" , "finish" ) ; } WebContainerRequestState requestState = WebContainerRequestState . getInstance ( false ) ; if ( requestState != null... | Finishes reading the request without closing the underlying stream . |
39,908 | public void resets ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "resets" , "resets" ) ; } this . in = null ; } | Resets the input stream for a new connection . |
39,909 | public void setContentLength ( long len ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "setContentLength" , "setContentLength + len ) ; } if ( len < 0 ) { logger . logp ( Level . SEVERE , CLASS_NAME , "setContentLength" , "Illeg... | Sets the content length for this input stream . This should be called once the headers have been read from the input stream . |
39,910 | public int read ( ) throws IOException { if ( total >= limit ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "read" , "Over the limit: -1" ) ; } return - 1 ; } if ( pos >= count ) { fill ( ) ; if ( pos >= count ) { if ( TraceCompo... | Reads a byte of data . This method will block if no input is available . |
39,911 | public int read ( byte [ ] read_buffer , int offset , int length ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "read" , "read length + length ) ; } if ( total >= limit ) { if ( TraceComponent . isAnyTracingEn... | Reads into an array of bytes . This method will block until some input is available . |
39,912 | public int readLine ( byte [ ] b , int off , int len ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "readLine" , "readLine" ) ; } if ( total >= limit ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger ... | Reads into an array of bytes until all requested bytes have been read or a \ n is encountered in which case the \ n is read into the array as well . |
39,913 | protected void fill ( ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "fill" , "fill" ) ; } long longLeft = limit - total ; int len ; if ( longLeft > Integer . MAX_VALUE ) len = buf . length ; else len = Math . ... | Fills input buffer with more bytes . |
39,914 | private String [ ] parseData ( String hashedPassword ) throws IllegalArgumentException { String [ ] items = hashedPassword . split ( ":" ) ; String error = null ; if ( items . length == 4 ) { if ( SUPPORTED_ALGORITHMS . contains ( items [ 0 ] ) ) { try { Integer . parseInt ( items [ 1 ] ) ; return items ; } catch ( Exc... | Parse the data by colon . Make sure that there are three colons and algorithm is one of supported ones and the 2nd param can be converted to the integer . |
39,915 | protected void parseParams ( Map < String , String > params ) { generateAlgorithm = indexOf ( PARAM_ALGORITHM , DEFAULT_ALGORITHM , SUPPORTED_ALGORITHMS , params . get ( PARAM_ALGORITHM ) ) ; generateIterations = parseInt ( PARAM_ITERATIONS , params . get ( PARAM_ITERATIONS ) , DEFAULT_ITERATIONS , MINIMUM_ITERATIONS )... | Parse the parameters . If the value is not set set the default if the value is invalid throw InvalidArgumentException |
39,916 | public static boolean isValidType ( Class clazz ) { if ( null == clazz ) throw new IllegalArgumentException ( ) ; if ( String . class == clazz ) return true ; if ( Boolean . class == clazz ) return true ; if ( JSONObject . class . isAssignableFrom ( clazz ) ) return true ; if ( JSONArray . class == clazz ) return true ... | Return whether the class is a valid type of value for a property . |
39,917 | public final void initialize ( ) throws PersistenceException , SevereMessageStoreException { PersistentMessageStore pm = _messageStore . getPersistentMessageStore ( ) ; final HashMap tupleMap = _buildTupleMap ( pm ) ; _buildStreamTree ( tupleMap ) ; _recoverStreamsWithInDoubts ( pm ) ; } | This method essentially drives the initial loading of the cache layer from the persistence layer . |
39,918 | public void commit ( ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "commit" , _txn ) ; if ( _tranManager . isReplayComplete ( ) ) { final int state = _txn . getTransactionState ( ) . getState ( ) ; switch ( state ) { case TransactionState . STATE_PREPARED : try { suspend ( ) ; try { _tranManag... | Informs the object that the transaction is to be committed |
39,919 | public void commitOnePhase ( ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "commitOnePhase" , _txn ) ; final int state = _txn . getTransactionState ( ) . getState ( ) ; switch ( state ) { case TransactionState . STATE_ACTIVE : suspend ( ) ; try { _tranManager . resume ( _txn ) ; _txn . prolong... | Informs the object that the transaction is to be committed in one - phase |
39,920 | public synchronized void rollback ( ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "rollback" , _txn ) ; if ( _prepared && ! _tranManager . isReplayComplete ( ) ) { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "rollback" , "throwing XAER_RMFAIL(1)" ) ; throw new XAException ( XAException . X... | Informs the object that the transaction is to be rolled back |
39,921 | public synchronized void forget ( ) throws XAException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "forget" , _txn ) ; if ( _tranManager . isReplayComplete ( ) ) { _heuristic = StatefulResource . NONE ; _txn . notifyCompletion ( ) ; } else { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "forget" , "throwing XA... | Informs the object that the transaction is to be forgotten |
39,922 | public void reset ( ) { _dstack . reset ( ) ; _current1 . reset ( ) ; _last1 . reset ( ) ; _eof = false ; _s = 0 ; _p = null ; } | Reset to post construction state . |
39,923 | private void findFirst ( DeleteStack stack ) { boolean x = optimisticFindFirst ( stack ) ; if ( x == pessimisticNeeded ) pessimisticFindFirst ( stack ) ; } | Find the first key in the index . |
39,924 | private boolean optimisticFindFirst ( DeleteStack stack ) { Object q = null ; int v1 = _index . vno ( ) ; int x1 = _index . xno ( ) ; if ( ( v1 & 1 ) != 0 ) return pessimisticNeeded ; synchronized ( this ) { } try { q = getFirst ( stack ) ; } catch ( NullPointerException npe ) { _nullPointerExceptions ++ ; return GBSTr... | Find first key in index using optimistic locking |
39,925 | private void pessimisticFindFirst ( DeleteStack stack ) { Object q = null ; int v1 = 0 ; int x1 = 0 ; synchronized ( _index ) { q = getFirst ( stack ) ; v1 = _index . vno ( ) ; x1 = _index . xno ( ) ; _pessimisticFindFirsts ++ ; } _current1 . setLocation ( q , v1 , x1 ) ; } | Find first key in index using pessimistic locking . |
39,926 | private Object getFirst ( DeleteStack stack ) { Object q = null ; GBSNode n = leftMostChild ( stack ) ; if ( n != null ) { q = n . leftMostKey ( ) ; _current1 . setLocation ( n , 0 ) ; } return q ; } | Return first key in the index in key order if any . |
39,927 | private GBSNode leftMostChild ( DeleteStack stack ) { GBSNode p ; p = _index . root ( ) ; GBSNode lastl = null ; if ( p != null ) { stack . start ( _index . dummyTopNode ( ) , "GBSIterator.leftMostChild" ) ; lastl = leftMostChild ( stack , p ) ; } return lastl ; } | Find the left - most child of the tree by following all of the left children down to the bottom of the tree . |
39,928 | private void findNextAfterEof ( DeleteStack stack ) { if ( ! _eof ) throw new RuntimeException ( "findNextAfterEof called when _eof false." ) ; if ( _current1 . _vno != _index . vno ( ) ) { boolean state = pessimisticNeeded ; state = optimisticSearchNext ( stack ) ; if ( state == pessimisticNeeded ) pessimisticSearchNe... | Find the next key in the index after an eof condition . |
39,929 | private boolean optimisticSearchNext ( DeleteStack stack ) { int v1 = _index . vno ( ) ; int x1 = _index . xno ( ) ; if ( ( v1 & 1 ) != 0 ) return pessimisticNeeded ; synchronized ( this ) { } try { internalSearchNext ( stack , v1 , x1 ) ; } catch ( NullPointerException npe ) { _nullPointerExceptions ++ ; return GBSTre... | Optimistically find the next key in the index after an eof condition . |
39,930 | private void pessimisticSearchNext ( DeleteStack stack ) { synchronized ( _index ) { internalSearchNext ( stack , _index . vno ( ) , _index . xno ( ) ) ; _pessimisticSearchNexts ++ ; } } | Pessimistically find the next key in the index after an eof condition . |
39,931 | private void internalSearchNext ( DeleteStack stack , int v1 , int x1 ) { SearchComparator comp = searchComparator ( SearchComparator . GT ) ; _s = 0 ; _p = null ; _eof = true ; _current1 . setVersion ( v1 ) ; SearchNode sn = searchNode ( ) ; Object q = _index . iteratorFind ( _dstack , comp , _last1 . key ( ) , sn ) ;... | Search to re - establish current iterator position . |
39,932 | private void pessimisticGetNext ( DeleteStack stack ) { synchronized ( _index ) { internalGetNext ( stack , _index . vno ( ) , _index . xno ( ) ) ; _pessimisticGetNexts ++ ; } } | Get the next key pessimistically . |
39,933 | private GBSNode nextNode ( DeleteStack stack ) { if ( _eof ) throw new RuntimeException ( "_eof is set on entry to nextNode()" ) ; boolean done = false ; GBSNode q = null ; GBSNode nextp = null ; while ( ! done ) { if ( stack . index ( ) > GBSTree . maxDepth ) throw new OptimisticDepthException ( "maxDepth (" + GBSTree... | Find the next node in the tree in key order . |
39,934 | public Object next ( ) { _current1 . reset ( ) ; if ( _last1 . key ( ) == null ) findFirst ( _dstack ) ; else { findNext ( _dstack ) ; if ( _current1 . key ( ) == null ) _eof = true ; } if ( _current1 . key ( ) != null ) _last1 . setLocation ( _current1 ) ; return _current1 . key ( ) ; } | Return the next element in the collection . |
39,935 | public InetSocketAddress getLocalAddress ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getLocalAddress" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getLocalAddress" , "rc=" + null ) ; return nu... | Retrieve the address of the local NIC to bind to . |
39,936 | public InetSocketAddress getRemoteAddress ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getRemoteAddress" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getRemoteAddress" , "rc=" + remoteAddress )... | Retrieves the address of the remote address to connect to . |
39,937 | public static Number convert ( Number value , Class < ? > type ) { if ( int . class . equals ( type ) || Integer . class . equals ( type ) ) value = value . intValue ( ) ; else if ( long . class . equals ( type ) || Long . class . equals ( type ) ) value = value . longValue ( ) ; else if ( short . class . equals ( type... | Converts a Number value to a Integer Long Short Byte Double or Float . If unable to convert the original value is returned . |
39,938 | public static Object convert ( String str , Class < ? > type ) throws Exception { Object value ; if ( int . class . equals ( type ) || Integer . class . equals ( type ) ) value = Integer . parseInt ( str ) ; else if ( boolean . class . equals ( type ) || Boolean . class . equals ( type ) ) value = Boolean . parseBoolea... | Converts a String value to the specified type . |
39,939 | public static byte [ ] serObjByte ( Object pk ) throws IOException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "serObjByte" , pk == null ? null : pk . getClass ( ) ) ; byte [ ] b ; try { ByteArrayOutputStream bos = new ByteArrayOutputStrea... | Serialize an object to a byte array . |
39,940 | public static void checkAccessibility ( String resourceName , String adapterName , String embeddedApp , String accessingApp , boolean isEndpoint ) throws ResourceException { if ( embeddedApp != null ) { if ( ! embeddedApp . equals ( accessingApp ) ) { String msg = null ; if ( isEndpoint ) { if ( accessingApp != null ) ... | Check accessibility of the resource adapter from the application . |
39,941 | private Map < String , Object > getUserinfoFromRegistryMap ( Set < String > claims , Map < String , Object > inputMap , boolean isJson ) throws Exception { Map < String , Object > result = inputMap ; VMMService vmmService = JwtUtils . getVMMService ( ) ; if ( vmmService != null ) { PropertyControl vmmServiceProps = new... | Get the JSONObject that will be returned for userinfo endpoint from the user registry |
39,942 | @ SuppressWarnings ( "rawtypes" ) public String vmmPropertyToString ( Object value ) { String result = null ; if ( value == null || value instanceof String ) { result = ( String ) value ; } else if ( value instanceof List ) { StringBuffer strBuff = null ; for ( Object element : ( List ) value ) { String elem = element ... | Convert the object to a String . If it s a list create a String of the elements as Strings delimited by blanks . |
39,943 | public static String decode ( String encoded ) { if ( encoded == null ) return null ; if ( encoded . indexOf ( '%' ) == - 1 && encoded . indexOf ( '+' ) == - 1 ) return encoded ; byte holdbuffer [ ] = new byte [ encoded . length ( ) ] ; char holdchar ; int bufcount = 0 ; for ( int count = 0 ; count < encoded . length (... | Decode an URL formatted string . |
39,944 | public static String URLEncode ( String s , String enc ) { if ( s == null ) { return "null" ; } if ( enc == null ) { enc = "ISO-8859-1" ; } StringBuffer out = new StringBuffer ( s . length ( ) ) ; ByteArrayOutputStream buf = new ByteArrayOutputStream ( ) ; OutputStreamWriter writer = null ; try { writer = new OutputStr... | URL encodes a string based on the supplied character encoding . This performs the same function as java . next . URLEncode . encode in J2SDK1 . 4 and should be removed if the only platform supported is 1 . 4 or higher . |
39,945 | public void doStartup ( ConfigurationProvider cp , boolean isSQLRecoveryLog ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "doStartup with cp: " + cp + " and flag: " + isSQLRecoveryLog ) ; String userDirEnv = System . getenv ( "WLP_USER_DIR" ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "TMS, WLP_USER_DIR ... | This method will start log recovery processing . |
39,946 | public void doShutdown ( boolean isSQLRecoveryLog ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "doShutdown with flag: " + isSQLRecoveryLog ) ; if ( isSQLRecoveryLog ) { try { TMHelper . shutdown ( ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.transaction.services.TransactionManag... | This method will shutdown log recovery processing if we are working with transaction logs stored in an RDBMS . |
39,947 | private byte [ ] createApplicationId ( String userDir , String serverName , String hostName ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createApplicationId" , new Object [ ] { userDir , serverName , hostName } ) ; byte [ ] result ; try { Strin... | Returns an application identifier key which can be used as a unique component within the global identifier and branch qualifier of an XID . This method is derived from tWAS |
39,948 | public EntityManager createEntityManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "createEntityManager : " + this ) ; EntityManager em = getEntityManager ( false , false ) ; JPAPooledEntityManager pem = new JPAPooledEntityManager ( this , em , ivAbstractJpaCompo... | Gets entity manager from pool and wraps it in an invocation type aware enlistment capable em . |
39,949 | public EntityManager createEntityManager ( Map arg0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "createEntityManager : " + this ) ; throw new UnsupportedOperationException ( "This operation is not supported on a pooling EntityManagerFactory." ) ; } | Pooled entity managers have their properties already defined . A provider exploiting the pool cannot use this method . |
39,950 | public Cache getCache ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getCache : " + this ) ; throw new UnsupportedOperationException ( "This operation is not supported on a pooling EntityManagerFactory." ) ; } | Prohibit access to the cache via the pool . |
39,951 | public CriteriaBuilder getCriteriaBuilder ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getCriteriaBuilder : " + this ) ; throw new UnsupportedOperationException ( "This operation is not supported on a pooling EntityManagerFactory." ) ; } | Prohibit access to the criteria builder via the pool . |
39,952 | public Metamodel getMetamodel ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getMetamodel : " + this ) ; throw new UnsupportedOperationException ( "This operation is not supported on a pooling EntityManagerFactory." ) ; } | Prohibit access to the metamodel via the pool . |
39,953 | public PersistenceUnitUtil getPersistenceUnitUtil ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getPersistenceUnitUtil : " + this ) ; throw new UnsupportedOperationException ( "This operation is not supported on a pooling EntityManagerFactory." ) ; } | Prohibit access to the persistence unit util via the pool . |
39,954 | public Map < String , Object > getProperties ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getProperties : " + this ) ; throw new UnsupportedOperationException ( "This operation is not supported on a pooling EntityManagerFactory." ) ; } | Prohibit access to factory properties via the pool . |
39,955 | public void complete ( VirtualConnection vc , TCPReadRequestContext rsc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "complete() called: vc=" + vc ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStateMap ( ) . get ( CallbackIDs... | When the response has been received we need to parse the status line and verify that it was the 100 Continue . If it was then pass along the notification to the application channel . If it was anything else then pass an error up to the application channel using the specific Expectation - Failed exception . |
39,956 | public void error ( VirtualConnection vc , TCPReadRequestContext rsc , IOException ioe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "error() called: vc=" + vc + " ioe=" + ioe ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStat... | Triggered when an error occurs during the read . |
39,957 | public void doFilter ( ServletRequest request , ServletResponse response ) throws ServletException , IOException { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "doFilter" , "entry" ) ; try { if ( ! _filtersDef... | Causes the next filter in the chain to be invoked or if at the end of the chain causes the requested resource to be invoked |
39,958 | public ClassLoader beginContextClassLoader ( ClassLoader raClassLoader ) { return raClassLoader == null ? null : AccessController . doPrivileged ( new GetAndSetContextClassLoader ( raClassLoader ) ) ; } | Set context classloader to the one for the resource adapter |
39,959 | public void endContextClassLoader ( ClassLoader raClassLoader , ClassLoader previousClassLoader ) { if ( raClassLoader != null ) { AccessController . doPrivileged ( new GetAndSetContextClassLoader ( previousClassLoader ) ) ; } } | Restore current context class loader saved when the context class loader was set to the one for the resource adapter . |
39,960 | public static ConnectionType getVCConnectionType ( VirtualConnection vc ) { if ( vc == null ) { return null ; } return ( ConnectionType ) vc . getStateMap ( ) . get ( CONNECTION_TYPE_VC_KEY ) ; } | Get the connection type from the virtual connection . |
39,961 | public static void setVCConnectionType ( VirtualConnection vc , ConnectionType connType ) { if ( vc == null || connType == null ) { return ; } Map < Object , Object > map = vc . getStateMap ( ) ; if ( vc instanceof InboundVirtualConnection && ConnectionType . isOutbound ( connType . type ) ) { throw new IllegalStateExc... | Set the connection type on the virtual connection . This will overlay any preset value . |
39,962 | public static ConnectionType getConnectionType ( byte type ) { switch ( type ) { case TYPE_OUTBOUND : return OUTBOUND ; case TYPE_OUTBOUND_CR_TO_REMOTE : return OUTBOUND_CR_TO_REMOTE ; case TYPE_OUTBOUND_SR_TO_CR_REMOTE : return OUTBOUND_SR_TO_CR_REMOTE ; case TYPE_INBOUND : return INBOUND ; case TYPE_INBOUND_CR : retu... | Set the connection type on the virtual connection . |
39,963 | static public int asInt ( byte [ ] array ) { if ( null == array || 4 != array . length ) { throw new IllegalArgumentException ( "Length of the byte array should be 4" ) ; } return ( ( array [ 0 ] << 24 ) + ( ( array [ 1 ] & 255 ) << 16 ) + ( ( array [ 2 ] & 255 ) << 8 ) + ( array [ 3 ] & 255 ) ) ; } | Takes an array of 4 bytes and returns an integer that is represented by them . |
39,964 | static public byte [ ] asBytes ( int value ) { if ( 0 > value ) { throw new IllegalArgumentException ( "value cannot be less than zero" ) ; } byte [ ] result = new byte [ 4 ] ; result [ 0 ] = ( byte ) ( ( value >>> 24 ) & 0xFF ) ; result [ 1 ] = ( byte ) ( ( value >>> 16 ) & 0xFF ) ; result [ 2 ] = ( byte ) ( ( value >... | Returns an array of 4 bytes that represent the integer . |
39,965 | static public String getEnglishString ( WsByteBuffer [ ] list ) { if ( null == list ) { return null ; } int size = 0 ; int i ; for ( i = 0 ; i < list . length && null != list [ i ] ; i ++ ) { size += list [ i ] . remaining ( ) ; } if ( 0 == size ) { return null ; } byte [ ] value = new byte [ size ] ; int offset = 0 ; ... | Utility method to take a list of buffers and convert their data into an English encoded string . These buffers are expected to be flipped already in that position is 0 and limit is the end of data in each one . |
39,966 | static public void dumpArrayToTraceLog ( byte [ ] arr ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "[ " ) ; if ( null == arr ) { Tr . debug ( tc , "null" ) ; } else { for ( int i = 0 ; i < arr . length ; i ++ ) { Tr . debug ( tc , arr [ i ] + " " ) ; } } Tr . debug ... | Writes the contents of the array to the trace log . |
39,967 | static public byte [ ] expandByteArray ( byte [ ] src , byte [ ] dst ) { int srcLength = ( null != src ) ? src . length : 0 ; int dstLength = ( null != dst ) ? dst . length : 0 ; return expandByteArray ( src , dst , 0 , srcLength , 0 , dstLength ) ; } | Generic method to copy the entire length of each buffer . |
39,968 | static public byte [ ] expandByteArray ( byte [ ] src , byte b ) { int srcLength = ( null != src ) ? src . length : 0 ; int totalLen = srcLength + 1 ; byte [ ] rc = new byte [ totalLen ] ; try { if ( null != src ) { System . arraycopy ( src , 0 , rc , 0 , srcLength ) ; } rc [ srcLength ] = b ; } catch ( Exception e ) {... | Helper method to append a byte to a byte array . |
39,969 | static public byte [ ] getBytes ( StringBuffer data ) { if ( null == data ) { return null ; } int len = data . length ( ) ; char [ ] chars = new char [ len ] ; data . getChars ( 0 , len , chars , 0 ) ; byte [ ] bytes = new byte [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { bytes [ i ] = ( byte ) chars [ i ] ; } return... | Utility method to get the bytes from a StringBuffer . These bytes will be in whatever encoding was in the original chars put into the string buffer object . |
39,970 | static public byte [ ] getBytes ( String input ) { if ( null != input ) { int length = input . length ( ) ; byte [ ] output = new byte [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { output [ i ] = ( byte ) input . charAt ( i ) ; } return output ; } return null ; } | Simple utility to get the bytes from a String but handle a null String as well . |
39,971 | static public String getEnglishString ( byte [ ] data ) { if ( null == data ) { return null ; } char chars [ ] = new char [ data . length ] ; for ( int i = 0 ; i < data . length ; i ++ ) { chars [ i ] = ( char ) ( data [ i ] & 0xff ) ; } return new String ( chars ) ; } | Utility method to get the ISO English string from the given bytes . If this an unsupported encoding exception is thrown by the conversion then an IllegalArgumentException will be thrown . |
39,972 | static private StringBuilder formatHexData ( StringBuilder buffer , byte [ ] data , int inOffset ) { int offset = inOffset ; int end = offset + 8 ; if ( offset >= data . length ) { buffer . append ( " " ) ; return buffer ; } buffer . append ( convertHex ( ( 0xff & data [ offset ] ) / 16 ) ) ; buff... | Format the next 8 bytes of the input data starting from the offset as 2 digit hex characters . |
39,973 | static private StringBuilder formatTextData ( StringBuilder buffer , byte [ ] data , int inOffset ) { int offset = inOffset ; int end = offset + 16 ; for ( ; offset < end ; offset ++ ) { if ( offset >= data . length ) { buffer . append ( " " ) ; continue ; } if ( Character . isLetterOrDigit ( data [ offset ] ) ) { buff... | Format the next 16 bytes of the input data starting from the input offset as ASCII characters . Non - ASCII bytes will be printed as a period symbol . |
39,974 | static public int skipToChar ( byte [ ] data , int start , byte target ) { int index = start ; while ( index < data . length && target != data [ index ] ) { index ++ ; } return index ; } | Utility method to skip past data in an array until it runs out of space or finds the target character . |
39,975 | static public int skipToChars ( byte [ ] data , int start , byte [ ] targets ) { int index = start ; int y = 0 ; byte current ; for ( ; index < data . length ; index ++ ) { current = data [ index ] ; for ( y = 0 ; y < targets . length ; y ++ ) { if ( current == targets [ y ] ) { return index ; } } } return index ; } | Utility method to skip past data in an array until it runs out of space or finds one of the the target characters . |
39,976 | static public int skipWhiteSpace ( byte [ ] data , int start ) { int index = start + 1 ; while ( index < data . length && BNFHeaders . SPACE == data [ index ] ) { index ++ ; } return index ; } | Simple method to skip past any space characters from the starting index onwards until it finds a non - space character or the end of the buffer . Returns the index it stopped on . |
39,977 | static public int sizeOf ( WsByteBuffer [ ] list ) { if ( null == list ) { return 0 ; } int size = 0 ; for ( int i = 0 ; i < list . length ; i ++ ) { if ( null != list [ i ] ) { size += list [ i ] . remaining ( ) ; } } return size ; } | Utility method to count the total number of used bytes in the list of buffers . This would represent the size of the data if it was printed out . |
39,978 | static public byte [ ] readValue ( ObjectInput in , int len ) throws IOException { int bytesRead = 0 ; byte [ ] data = new byte [ len ] ; for ( int offset = 0 ; offset < len ; offset += bytesRead ) { bytesRead = in . read ( data , offset , len - offset ) ; if ( bytesRead == - 1 ) { throw new IOException ( "Could not re... | Encapsulate the logic to read an entire byte array from the input stream . |
39,979 | static public String blockContents ( byte [ ] value ) { if ( null == value ) { return null ; } char [ ] data = new char [ value . length ] ; for ( int i = 0 ; i < data . length ; i ++ ) { data [ i ] = '*' ; } return new String ( data ) ; } | Create a string that is the same length as the input but filled with characters . |
39,980 | private void handleCollectiveLogin ( X509Certificate certChain [ ] , CollectiveAuthenticationPlugin plugin , boolean collectiveCert ) throws InvalidNameException , AuthenticationException , Exception { plugin . authenticateCertificateChain ( certChain , collectiveCert ) ; X509Certificate cert = certChain [ 0 ] ; X500Pr... | Handles a collective certificate login . |
39,981 | private void addCredentials ( String accessId ) throws Exception { temporarySubject = new Subject ( ) ; Hashtable < String , Object > hashtable = new Hashtable < String , Object > ( ) ; hashtable . put ( AttributeNameConstants . WSCREDENTIAL_UNIQUEID , AccessIdUtil . getUniqueId ( accessId ) ) ; temporarySubject . getP... | Add unique ID and call setPrincipalAndCredentials |
39,982 | private void handleUserLogin ( X509Certificate certChain [ ] ) throws RegistryException , CertificateMapNotSupportedException , CertificateMapFailedException , EntryNotFoundException , Exception { UserRegistry userRegistry = getUserRegistry ( ) ; username = userRegistry . mapCertificate ( certChain ) ; authenticatedId ... | Handles a non - collective certificate login . |
39,983 | private BeanDiscoveryMode getBeanDiscoveryMode ( ) { if ( beanDiscoveryMode == null ) { BeansXml beansXml = getBeansXml ( ) ; beanDiscoveryMode = BeanDiscoveryMode . ANNOTATED ; if ( beansXml != null ) { beanDiscoveryMode = beansXml . getBeanDiscoveryMode ( ) ; } else if ( ( cdiRuntime . isImplicitBeanArchivesScanningD... | Determine the bean deployment archive scanning mode If there is a beans . xml the bean discovery mode will be used . If there is no beans . xml the mode will be annotated unless the enableImplicitBeanArchives is configured as false via the server . xml . If there is no beans . xml and the enableImplicitBeanArchives att... |
39,984 | private void removeVetoedClasses ( Set < Class < ? > > classes ) { Set < String > classNames = new HashSet < String > ( ) ; for ( Class < ? > clazz : classes ) { classNames . add ( clazz . getName ( ) ) ; } Collection < String > includedClasses = WeldCDIUtils . filterClassesBasedOnBeansXML ( this . beansXml , this . re... | Need to removed the vetoed classes from the set so that we can ignore them |
39,985 | private ControllableSubscription getSubscription ( String id ) throws SIMPControllableNotFoundException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getSubscription" , id ) ; SIBUuid12 uuid = new SIBUuid12 ( id ) ; SubscriptionTypeFilter filter = new SubscriptionTyp... | Gets and returns the subscription based on the id . |
39,986 | @ SuppressWarnings ( "unused" ) protected void activate ( ComponentContext context ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Activating the HTTP pipeline event handler" ) ; } } | DS method for activation of this service component . |
39,987 | @ SuppressWarnings ( "unused" ) protected void deactivate ( ComponentContext context ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Deactivating the HTTP pipeline event handler" ) ; } } | DS method for deactivation of this service component . |
39,988 | static public byte [ ] getEnglishBytes ( String data ) { if ( null == data ) { return null ; } char [ ] chars = data . toCharArray ( ) ; byte [ ] bytes = new byte [ chars . length ] ; for ( int i = 0 ; i < chars . length ; i ++ ) { bytes [ i ] = ( byte ) chars [ i ] ; } return bytes ; } | Utility method to get ISO english encoded bytes from the input string . |
39,989 | static public String getEnglishString ( byte [ ] data , int start , int end ) { int len = end - start ; if ( 0 >= len || null == data ) { return null ; } char chars [ ] = new char [ len ] ; for ( int i = start ; i < end ; i ++ ) { chars [ i ] = ( char ) ( data [ i ] & 0xff ) ; } return new String ( chars ) ; } | Utility method to get the ISO English string from the given bytes . |
39,990 | public void createInterceptorInstances ( InjectionEngine injectionEngine , Object [ ] interceptors , ManagedObjectContext managedObjectContext , ManagedBeanOBase targetContext ) throws Exception { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . ent... | Create the interceptor instances associated with this enterprise bean instance . The lifetime of interceptor instances is identical to lifetime of the EJB instance . |
39,991 | public void run ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "run" ) ; } try { framework . stopChain ( chainName , 0L ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) + ".run" , "68" , this , new Object [ ] { chainName }... | This method will be called when the secondsToWait expires after this task has been placed in the channel framework s timer . |
39,992 | public String [ ] getOptionValues ( ) { String [ ] values = new String [ valueOptions . size ( ) ] ; for ( int i = 0 ; i < values . length ; i ++ ) { values [ i ] = valueOptions . get ( i ) [ 0 ] ; } return values ; } | return only values from option |
39,993 | public String [ ] getOptionLabels ( ) { String [ ] labels = new String [ valueOptions . size ( ) ] ; for ( int i = 0 ; i < labels . length ; i ++ ) { labels [ i ] = valueOptions . get ( i ) [ 1 ] ; } return labels ; } | return only labels from option |
39,994 | private SubscriptionMessage createSubscriptionMessage ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createSubscriptionMessage" ) ; ControlMessageFactory factory = null ; SubscriptionMessage subscriptionMessage = null ; try { factory = MessageProcessor . getControlMessageFactory ( ) ; subscriptionMessage = ... | This method creates the subscription control message |
39,995 | private void reset ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "reset" ) ; if ( iInitialised ) { iTopics . clear ( ) ; iTopicSpaces . clear ( ) ; iTopicSpaceMappings . clear ( ) ; iSubscriptionMessage = createSubscriptionMessage ( ) ; } else { iInitialised = true ; } if ( tc . isEntryEnabled ( ) ) SibTr .... | Resets the complete message state |
39,996 | protected void resetCreateSubscriptionMessage ( MESubscription subscription , boolean isLocalBus ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetCreateSubscriptionMessage" , new Object [ ] { subscription , new Boolean ( isLocalBus ) } ) ; reset ( ) ; iSubscriptionMessage . setSubscriptionMessageType ( Sub... | Method to reset the Subscription message object and reinitialise it as a create proxy subscription message |
39,997 | protected void resetDeleteSubscriptionMessage ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetDeleteSubscriptionMessage" ) ; reset ( ) ; iSubscriptionMessage . setSubscriptionMessageType ( SubscriptionMessageType . DELETE ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "resetDeleteSubscriptionMes... | Method to reset the Subscription message object and reinitialise it as a delete proxy subscription message . |
39,998 | protected void resetResetSubscriptionMessage ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetResetSubscriptionMessage" ) ; reset ( ) ; iSubscriptionMessage . setSubscriptionMessageType ( SubscriptionMessageType . RESET ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "resetResetSubscriptionMessage... | Method to reset the Subscription message object and reinitialise it as a Reset proxy subscription message |
39,999 | protected void resetReplySubscriptionMessage ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetReplySubscriptionMessage" ) ; reset ( ) ; iSubscriptionMessage . setSubscriptionMessageType ( SubscriptionMessageType . REPLY ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "resetReplySubscriptionMessage... | Method to reset the Subscription message object and reinitialise it as a Reply proxy subscription message |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.