idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
38,200 | public MutableArray insertDate ( int index , Date value ) { return insertValue ( index , value ) ; } | Inserts a Date object at the given index . |
38,201 | public MutableArray insertArray ( int index , Array value ) { return insertValue ( index , value ) ; } | Inserts an Array object at the given index . |
38,202 | public MutableArray insertDictionary ( int index , Dictionary value ) { return insertValue ( index , value ) ; } | Inserts a Dictionary object at the given index . |
38,203 | public MutableArray remove ( int index ) { synchronized ( lock ) { if ( ! internalArray . remove ( index ) ) { throwRangeException ( index ) ; } return this ; } } | Removes the object at the given index . |
38,204 | public FLSliceResult getContents ( C4BlobKey blobKey ) throws LiteCoreException { return new FLSliceResult ( getContents ( handle , blobKey . getHandle ( ) ) ) ; } | Reads the entire contents of a blob into memory . Caller is responsible for freeing it . |
38,205 | public C4BlobReadStream openReadStream ( C4BlobKey blobKey ) throws LiteCoreException { return new C4BlobReadStream ( openReadStream ( handle , blobKey . getHandle ( ) ) ) ; } | Opens a blob for reading as a random - access byte stream . |
38,206 | public MValue get ( long index ) { if ( index < 0 || index >= values . size ( ) ) { return MValue . EMPTY ; } MValue value = values . get ( ( int ) index ) ; if ( value . isEmpty ( ) && ( baseArray != null ) ) { value = new MValue ( baseArray . get ( index ) ) ; values . set ( ( int ) index , value ) ; } return value ;... | Returns a reference to the MValue of the item at the given index . If the index is out of range returns an empty MValue . |
38,207 | public static String getVersionInfo ( ) { String info = versionInfo . get ( ) ; if ( info == null ) { info = String . format ( Locale . ENGLISH , VERSION_INFO , getLibInfo ( ) , getSysInfo ( ) ) ; versionInfo . compareAndSet ( null , info ) ; } return info ; } | This is the full library build and environment information . |
38,208 | public static String getLibInfo ( ) { String info = libInfo . get ( ) ; if ( info == null ) { info = String . format ( Locale . ENGLISH , LIB_INFO , C4 . getVersion ( ) ) ; libInfo . compareAndSet ( null , info ) ; } return info ; } | This is the short library build information . |
38,209 | public static String getSysInfo ( ) { String info = sysInfo . get ( ) ; if ( info == null ) { info = String . format ( Locale . ENGLISH , SYS_INFO , System . getProperty ( "os.name" , "unknown" ) ) ; sysInfo . compareAndSet ( null , info ) ; } return info ; } | This is information about the system on which we are running . |
38,210 | public Map < String , Object > toMap ( ) { synchronized ( lock ) { final Map < String , Object > result = new HashMap < > ( ) ; for ( String key : internalDict ) { result . put ( key , Fleece . toObject ( getMValue ( internalDict , key ) . asNative ( internalDict ) ) ) ; } return result ; } } | Gets content of the current object as an Map . The values contained in the returned Map object are all JSON based values . |
38,211 | public String getString ( int index ) { check ( index ) ; final Object obj = fleeceValueToObject ( index ) ; return obj instanceof String ? ( String ) obj : null ; } | The projecting result value at the given index as a String object |
38,212 | public Number getNumber ( int index ) { check ( index ) ; return CBLConverter . asNumber ( fleeceValueToObject ( index ) ) ; } | The projecting result value at the given index as a Number object |
38,213 | public int getInt ( int index ) { check ( index ) ; final FLValue flValue = values . get ( index ) ; return flValue != null ? ( int ) flValue . asInt ( ) : 0 ; } | The projecting result value at the given index as a integer value |
38,214 | public float getFloat ( int index ) { check ( index ) ; final FLValue flValue = values . get ( index ) ; return flValue != null ? flValue . asFloat ( ) : 0.0F ; } | The projecting result value at the given index as a float value |
38,215 | public double getDouble ( int index ) { check ( index ) ; final FLValue flValue = values . get ( index ) ; return flValue != null ? flValue . asDouble ( ) : 0.0 ; } | The projecting result value at the given index as a double value |
38,216 | public boolean getBoolean ( int index ) { check ( index ) ; final FLValue flValue = values . get ( index ) ; return flValue != null && flValue . asBool ( ) ; } | The projecting result value at the given index as a boolean value |
38,217 | public Blob getBlob ( int index ) { check ( index ) ; final Object obj = fleeceValueToObject ( index ) ; return obj instanceof Blob ? ( Blob ) obj : null ; } | The projecting result value at the given index as a Blob object |
38,218 | public Date getDate ( int index ) { check ( index ) ; return DateUtils . fromJson ( getString ( index ) ) ; } | The projecting result value at the given index as an Array object |
38,219 | public Array getArray ( int index ) { check ( index ) ; final Object obj = fleeceValueToObject ( index ) ; return obj instanceof Array ? ( Array ) obj : null ; } | The projecting result value at the given index as a Array object |
38,220 | public Dictionary getDictionary ( int index ) { check ( index ) ; final Object obj = fleeceValueToObject ( index ) ; return obj instanceof Dictionary ? ( Dictionary ) obj : null ; } | The projecting result value at the given index as a Dictionary object |
38,221 | public List < Object > toList ( ) { final List < Object > array = new ArrayList < > ( ) ; for ( int i = 0 ; i < count ( ) ; i ++ ) { array . add ( values . get ( i ) . asObject ( ) ) ; } return array ; } | Gets all values as an List . The value types of the values contained in the returned List object are Array Blob Dictionary Number types String and null . |
38,222 | public Map < String , Object > toMap ( ) { final List < Object > values = toList ( ) ; final Map < String , Object > dict = new HashMap < > ( ) ; for ( String name : rs . getColumnNames ( ) . keySet ( ) ) { final int index = indexForColumnName ( name ) ; if ( index >= 0 ) { dict . put ( name , values . get ( index ) ) ... | Gets all values as a Dictionary . The value types of the values contained in the returned Dictionary object are Array Blob Dictionary Number types String and null . |
38,223 | public Expression isNullOrMissing ( ) { return new UnaryExpression ( this , UnaryExpression . OpType . Null ) . or ( new UnaryExpression ( this , UnaryExpression . OpType . Missing ) ) ; } | Creates an IS NULL OR MISSING expression that evaluates whether or not the current expression is null or missing . |
38,224 | public static void throwException ( int domain , int code , String msg ) throws LiteCoreException { throw new LiteCoreException ( domain , code , msg ) ; } | NOTE called to throw LiteCoreException from native code to Java |
38,225 | public void compact ( ) throws CouchbaseLiteException { synchronized ( lock ) { mustBeOpen ( ) ; try { getC4Database ( ) . compact ( ) ; } catch ( LiteCoreException e ) { throw CBLStatus . convertException ( e ) ; } } } | Compacts the database file by deleting unused attachment files and vacuuming the SQLite database |
38,226 | public void close ( ) throws CouchbaseLiteException { synchronized ( lock ) { if ( c4db == null ) { return ; } Log . i ( DOMAIN , "Closing %s at path %s" , this , getC4Database ( ) . getPath ( ) ) ; if ( activeReplications . size ( ) > 0 ) { throw new CouchbaseLiteException ( "Cannot close the database. Please stop al... | Closes a database . |
38,227 | public void delete ( ) throws CouchbaseLiteException { synchronized ( lock ) { mustBeOpen ( ) ; Log . i ( DOMAIN , "Deleting %s at path %s" , this , getC4Database ( ) . getPath ( ) ) ; if ( activeReplications . size ( ) > 0 ) { throw new CouchbaseLiteException ( "Cannot delete the database. Please stop all of the repl... | Deletes a database . |
38,228 | private boolean save ( Document document , boolean deletion , ConcurrencyControl concurrencyControl ) throws CouchbaseLiteException { if ( deletion && ! document . exists ( ) ) { throw new CouchbaseLiteException ( "Cannot delete a document that has not yet been saved." , CBLError . Domain . CBLITE , CBLError . Code . N... | The main save method . |
38,229 | void start ( ) { synchronized ( lock ) { if ( query . getDatabase ( ) == null ) { throw new IllegalArgumentException ( "associated database should not be null." ) ; } observing = true ; releaseResultSet ( ) ; query . getDatabase ( ) . getActiveLiveQueries ( ) . add ( this ) ; if ( dbListenerToken == null ) { dbListener... | Starts observing database changes and reports changes in the query result . |
38,230 | private void stop ( boolean removeFromList ) { synchronized ( lock ) { observing = false ; willUpdate = false ; if ( query != null && query . getDatabase ( ) != null && dbListenerToken != null ) { query . getDatabase ( ) . removeChangeListener ( dbListenerToken ) ; dbListenerToken = null ; } if ( removeFromList && quer... | Stops observing database changes . |
38,231 | public C4Replicator createReplicator ( C4Socket openSocket , int push , int pull , byte [ ] options , C4ReplicatorListener listener , Object replicatorContext ) throws LiteCoreException { return new C4Replicator ( handle , openSocket . handle , push , pull , options , listener , replicatorContext ) ; } | - Fleece - related |
38,232 | void addNetworkReachabilityListener ( NetworkReachabilityListener listener ) { synchronized ( listeners ) { listeners . add ( listener ) ; if ( listeners . size ( ) == 1 ) { startListening ( ) ; } } } | Add Network Reachability Listener |
38,233 | void removeNetworkReachabilityListener ( NetworkReachabilityListener listener ) { synchronized ( listeners ) { listeners . remove ( listener ) ; if ( listeners . size ( ) == 0 ) { stopListening ( ) ; } } } | Remove Network Reachability Listener |
38,234 | void notifyListenersNetworkReachable ( ) { final Set < NetworkReachabilityListener > copy = new HashSet < > ( listeners ) ; for ( NetworkReachabilityListener listener : copy ) { if ( listener != null ) { listener . networkReachable ( ) ; } } } | Notify listeners that the network is now reachable |
38,235 | void notifyListenersNetworkUneachable ( ) { final Set < NetworkReachabilityListener > copy = new HashSet < > ( listeners ) ; for ( NetworkReachabilityListener listener : copy ) { if ( listener != null ) { listener . networkUnreachable ( ) ; } } } | Notify listeners that the network is now unreachable |
38,236 | public Object getValue ( int index ) { synchronized ( lock ) { return getMValue ( internalArray , index ) . asNative ( internalArray ) ; } } | Gets value at the given index as an object . The object types are Blob Array Dictionary Number or String based on the underlying data type ; or nil if the value is nil . |
38,237 | public String getString ( int index ) { synchronized ( lock ) { final Object obj = getMValue ( internalArray , index ) . asNative ( internalArray ) ; return obj instanceof String ? ( String ) obj : null ; } } | Gets value at the given index as a String . Returns null if the value doesn t exist or its value is not a String . |
38,238 | public Number getNumber ( int index ) { synchronized ( lock ) { return CBLConverter . asNumber ( getMValue ( internalArray , index ) . asNative ( internalArray ) ) ; } } | Gets value at the given index as a Number . Returns null if the value doesn t exist or its value is not a Number . |
38,239 | public int getInt ( int index ) { synchronized ( lock ) { return CBLConverter . asInteger ( getMValue ( internalArray , index ) , internalArray ) ; } } | Gets value at the given index as an int . Floating point values will be rounded . The value true is returned as 1 false as 0 . Returns 0 if the value doesn t exist or does not have a numeric value . |
38,240 | public long getLong ( int index ) { synchronized ( lock ) { return CBLConverter . asLong ( getMValue ( internalArray , index ) , internalArray ) ; } } | Gets value at the given index as an long . Floating point values will be rounded . The value true is returned as 1 false as 0 . Returns 0 if the value doesn t exist or does not have a numeric value . |
38,241 | public float getFloat ( int index ) { synchronized ( lock ) { return CBLConverter . asFloat ( getMValue ( internalArray , index ) , internalArray ) ; } } | Gets value at the given index as an float . Integers will be converted to float . The value true is returned as 1 . 0 false as 0 . 0 . Returns 0 . 0 if the value doesn t exist or does not have a numeric value . |
38,242 | public double getDouble ( int index ) { synchronized ( lock ) { return CBLConverter . asDouble ( getMValue ( internalArray , index ) , internalArray ) ; } } | Gets value at the given index as an double . Integers will be converted to double . The value true is returned as 1 . 0 false as 0 . 0 . Returns 0 . 0 if the property doesn t exist or does not have a numeric value . |
38,243 | public boolean getBoolean ( int index ) { synchronized ( lock ) { return CBLConverter . asBoolean ( getMValue ( internalArray , index ) . asNative ( internalArray ) ) ; } } | Gets value at the given index as a boolean . |
38,244 | public Blob getBlob ( int index ) { synchronized ( lock ) { return ( Blob ) getMValue ( internalArray , index ) . asNative ( internalArray ) ; } } | Gets value at the given index as a Blob . Returns null if the value doesn t exist or its value is not a Blob . |
38,245 | public Array getArray ( int index ) { synchronized ( lock ) { final Object obj = getMValue ( internalArray , index ) . asNative ( internalArray ) ; return obj instanceof Array ? ( Array ) obj : null ; } } | Gets a Array at the given index . Return null if the value is not an array . |
38,246 | public Dictionary getDictionary ( int index ) { synchronized ( lock ) { final Object obj = getMValue ( internalArray , index ) . asNative ( internalArray ) ; return obj instanceof Dictionary ? ( Dictionary ) obj : null ; } } | Gets a Dictionary at the given index . Return null if the value is not an dictionary . |
38,247 | public List < Object > toList ( ) { synchronized ( lock ) { final int count = ( int ) internalArray . count ( ) ; final List < Object > result = new ArrayList < > ( count ) ; for ( int index = 0 ; index < count ; index ++ ) { result . add ( Fleece . toObject ( getMValue ( internalArray , index ) . asNative ( internalAr... | Gets content of the current object as an List . The values contained in the returned List object are all JSON based values . |
38,248 | public C4Document update ( byte [ ] body , int flags ) throws LiteCoreException { return new C4Document ( update ( handle , body , flags ) ) ; } | - Purging and Expiration |
38,249 | public C4QueryEnumerator run ( C4QueryOptions options , AllocSlice parameters ) throws LiteCoreException { if ( parameters == null ) { parameters = new AllocSlice ( null ) ; } return new C4QueryEnumerator ( run ( handle , options . isRankFullText ( ) , parameters . getHandle ( ) ) ) ; } | - Creates a database index to speed up subsequent queries . |
38,250 | @ SuppressWarnings ( { "MethodName" , "PMD.MethodNamingConventions" } ) public static void socket_open ( long socket , Object socketFactoryContext , String scheme , String hostname , int port , String path , byte [ ] optionsFleece ) { Log . e ( TAG , "CBLWebSocket.socket_open()" ) ; Map < String , Object > options = nu... | !! Called by reflection! Don t change the name . |
38,251 | public void start ( ) { synchronized ( lock ) { Log . i ( DOMAIN , "Replicator is starting ....." ) ; if ( c4repl != null ) { Log . i ( DOMAIN , "%s has already started" , this ) ; return ; } Log . i ( DOMAIN , "%s: Starting" , this ) ; retryCount = 0 ; internalStart ( ) ; } } | Starts the replicator . This method returns immediately ; the replicator runs asynchronously and will report its progress throuh the replicator change notification . |
38,252 | public void stop ( ) { synchronized ( lock ) { Log . i ( DOMAIN , "%s: Replicator is stopping ..." , this ) ; if ( c4repl != null ) { c4repl . stop ( ) ; } else { Log . i ( DOMAIN , "%s: Replicator has been stopped or offlined ..." , this ) ; } if ( c4ReplStatus . getActivityLevel ( ) == C4ReplicatorStatus . ActivityLe... | Stops a running replicator . This method returns immediately ; when the replicator actually stops the replicator will change its status s activity level to kCBLStopped and the replicator change notification will be notified accordingly . |
38,253 | public void resetCheckpoint ( ) { synchronized ( lock ) { if ( c4ReplStatus != null && c4ReplStatus . getActivityLevel ( ) != C4ReplicatorStatus . ActivityLevel . STOPPED ) { throw new IllegalStateException ( "Replicator is not stopped. Resetting checkpoint is only allowed when the replicator is in the " + "stopped sta... | Resets the local checkpoint of the replicator meaning that it will read all changes since the beginning of time from the remote database . This can only be called when the replicator is in a stopped state . |
38,254 | public void setParameters ( Parameters parameters ) { final LiveQuery liveQuery ; synchronized ( lock ) { this . parameters = parameters != null ? parameters . readonlyCopy ( ) : null ; liveQuery = this . query ; } if ( liveQuery != null ) { liveQuery . start ( ) ; } } | Set parameters should copy the given parameters . Set a new parameter will also re - execute the query if there is at least one listener listening for changes . |
38,255 | private static Endpoint initServiceEndpoint ( EndpointRegistry epRegistry , String contextPath , String servletName ) { if ( contextPath . startsWith ( "/" ) ) contextPath = contextPath . substring ( 1 ) ; final ObjectName oname = ObjectNameFactory . create ( Endpoint . SEPID_DOMAIN + ":" + Endpoint . SEPID_PROPERTY_CO... | Initialize the service endpoint |
38,256 | public Configurer createServerConfigurer ( BindingCustomization customization , WSDLFilePublisher wsdlPublisher , ArchiveDeployment dep ) { ServerBeanCustomizer customizer = new ServerBeanCustomizer ( ) ; customizer . setBindingCustomization ( customization ) ; customizer . setWsdlPublisher ( wsdlPublisher ) ; customiz... | A convenient method for getting a jbossws cxf server configurer |
38,257 | private static String rewriteSoapAddress ( SOAPAddressRewriteMetadata sarm , String origAddress , String newAddress , String uriScheme ) { try { URL url = new URL ( newAddress ) ; String path = url . getPath ( ) ; String host = sarm . getWebServiceHost ( ) ; String port = getDotPortNumber ( uriScheme , sarm ) ; StringB... | Rewrite the provided address according to the current server configuration and always using the specified uriScheme . |
38,258 | protected Map < String , String > attributesByBeanRef ( String beanRef ) { Map < String , String > result = null ; for ( Entry < String , String > e : map . entrySet ( ) ) { final String k = e . getKey ( ) ; if ( k . startsWith ( beanRef ) && k . startsWith ( DOT , beanRef . length ( ) ) ) { if ( result == null ) { res... | Return an attribute name to attribute value map |
38,259 | static String getSystemProperty ( final String name , final String defaultValue ) { PrivilegedAction < String > action = new PrivilegedAction < String > ( ) { public String run ( ) { return System . getProperty ( name , defaultValue ) ; } } ; return AccessController . doPrivileged ( action ) ; } | Return the current value of the specified system property |
38,260 | static Class < ? > loadClass ( final ClassLoader cl , final String name ) throws PrivilegedActionException , ClassNotFoundException { SecurityManager sm = System . getSecurityManager ( ) ; if ( sm == null ) { return cl . loadClass ( name ) ; } else { return AccessController . doPrivileged ( new PrivilegedExceptionActio... | Load a class using the provided classloader |
38,261 | public Object invoke ( Exchange exchange , Object o ) { BindingOperationInfo bop = exchange . getBindingOperationInfo ( ) ; MethodDispatcher md = ( MethodDispatcher ) exchange . getService ( ) . get ( MethodDispatcher . class . getName ( ) ) ; List < Object > params = null ; if ( o instanceof List ) { params = CastUtil... | This overrides org . apache . cxf . jaxws . AbstractInvoker in order for using the JBoss AS target bean and simplifying the business method matching |
38,262 | protected Object performInvocation ( Exchange exchange , final Object serviceObject , Method m , Object [ ] paramArray ) throws Exception { Endpoint ep = exchange . get ( Endpoint . class ) ; final InvocationHandler invHandler = ep . getInvocationHandler ( ) ; final Invocation inv = createInvocation ( invHandler , serv... | This overrides org . apache . cxf . jaxws . AbstractInvoker in order for using the JBossWS integration logic to invoke the JBoss AS target bean . |
38,263 | private static String getTypeNamespace ( String packageName ) { StringBuilder sb = new StringBuilder ( "http://" ) ; StringTokenizer st = new StringTokenizer ( packageName , "." ) ; Stack < String > stk = new Stack < String > ( ) ; while ( st != null && st . hasMoreTokens ( ) ) { stk . push ( st . nextToken ( ) ) ; } S... | Extracts the typeNS given the package name Algorithm is based on the one specified in JAXWS v2 . 0 spec |
38,264 | protected void publishContractToFilesystem ( ) { if ( wsdlPublisher != null ) { Endpoint endpoint = getServer ( ) . getEndpoint ( ) ; Service service = endpoint . getService ( ) ; try { String wsdlLocation = getWsdlLocation ( ) ; if ( wsdlLocation == null ) { JaxWsImplementorInfo info = new JaxWsImplementorInfo ( getIm... | Publish the contract to a file using the configured wsdl publisher |
38,265 | private void updateSoapAddress ( ) { final SOAPAddressRewriteMetadata metadata = getSOAPAddressRewriteMetadata ( ) ; if ( metadata . isModifySOAPAddress ( ) ) { List < ServiceInfo > sevInfos = getServer ( ) . getEndpoint ( ) . getService ( ) . getServiceInfos ( ) ; for ( ServiceInfo si : sevInfos ) { Collection < Endpo... | For both code - first and wsdl - first scenarios reset the endpoint address so that it is written to the generated wsdl file . |
38,266 | private AbstractHTTPDestination findDestination ( HttpServletRequest req , Bus bus ) throws ServletException { String requestURI = req . getRequestURI ( ) ; DestinationRegistry destRegistry = getDestinationRegistryFromBus ( bus ) ; if ( destRegistry == null ) { throw Messages . MESSAGES . cannotObtainRegistry ( Destina... | Finds destination based on request URI |
38,267 | private static String getRegexp ( SedArguments args ) { if ( args . isRegexpSet ( ) ) { return args . getRegexp ( ) ; } if ( args . isString1Set ( ) ) { return args . getString1 ( ) ; } return "" ; } | Returns the regexp operand from args either called regexp or string1 . If none of the two is set an empty string is returned . |
38,268 | private static String getReplacement ( SedArguments args ) { if ( args . isReplacementSet ( ) ) { return args . getReplacement ( ) ; } if ( args . isString2Set ( ) ) { return args . getString2 ( ) ; } return "" ; } | Returns the replacement operand from args either called replacement or string2 . If none of the two is set an empty string is returned . |
38,269 | private static int findStartTrimWhitespace ( CharSequence s ) { final int len = s . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { if ( ! Character . isWhitespace ( s . charAt ( i ) ) ) { return i ; } } return len ; } | Finds and returns the start of the given sequence after trimming whitespace characters from the left . |
38,270 | private static int findWhitespace ( CharSequence s , int start ) { final int len = s . length ( ) ; for ( int i = start ; i < len ; i ++ ) { if ( Character . isWhitespace ( s . charAt ( i ) ) ) { return i ; } } return len ; } | Finds and returns the first whitespace character in the given sequence at or after start . Returns the length of the string if no whitespace is found . |
38,271 | public static Bus getClassLoaderDefaultBus ( final ClassLoader classloader , final ClientBusSelector clientBusSelector ) { Bus classLoaderBus ; synchronized ( classLoaderBusses ) { classLoaderBus = classLoaderBusses . get ( classloader ) ; if ( classLoaderBus == null ) { classLoaderBus = clientBusSelector . createNewBu... | Gets the default bus for the given classloader ; if a new Bus is needed the creation is delegated to the specified ClientBusSelector instance . |
38,272 | public static Bus getClassLoaderDefaultBus ( final ClassLoader classloader ) { Bus classLoaderBus ; synchronized ( classLoaderBusses ) { classLoaderBus = classLoaderBusses . get ( classloader ) ; if ( classLoaderBus == null ) { classLoaderBus = new JBossWSBusFactory ( ) . createBus ( ) ; BusLifeCycleListener listener =... | Gets the default bus for the given classloader |
38,273 | public static void clearDefaultBusForAnyClassLoader ( final Bus bus ) { synchronized ( classLoaderBusses ) { for ( final Iterator < Bus > iterator = classLoaderBusses . values ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { Bus itBus = iterator . next ( ) ; if ( bus == null || itBus == null || bus . equals ( itBus ) ... | Removes a bus from being the default bus for any classloader |
38,274 | static boolean checkAndFixContextClassLoader ( ClassLoader origClassLoader ) { try { origClassLoader . loadClass ( ProviderImpl . class . getName ( ) ) ; } catch ( Exception e ) { ClassLoader clientClassLoader = ProviderImpl . class . getClassLoader ( ) ; if ( BusFactory . getDefaultBus ( false ) == null ) { JBossWSBus... | Ensure the current context classloader can load this ProviderImpl class . |
38,275 | public boolean compileFiles ( String [ ] files ) { JavaCompiler compiler = ToolProvider . getSystemJavaCompiler ( ) ; if ( compiler == null ) { throw new IllegalStateException ( "No compiler detected, make sure you are running on top of a JDK instead of a JRE." ) ; } StandardJavaFileManager fileManager = compiler . get... | unix file separator |
38,276 | public String getTrimmedPath ( String path ) { if ( path == null ) { return "/" ; } if ( ! path . startsWith ( "/" ) ) { try { path = new URL ( path ) . getPath ( ) ; } catch ( MalformedURLException ex ) { Logger . getLogger ( JBossWSDestinationRegistryImpl . class ) . trace ( ex ) ; } if ( ! path . startsWith ( "/" ) ... | Return a real path value removing the protocol host and port if specified . |
38,277 | @ Resource ( name = "cxf" ) public final void setBus ( Bus bus ) { assert this . bus == null || this . bus == bus ; this . bus = bus ; if ( bus != null ) { bus . setExtension ( this , UndertowServerEngineFactory . class ) ; lifeCycleManager = bus . getExtension ( BusLifeCycleManager . class ) ; if ( null != lifeCycleMa... | This call is used to set the bus . It should only be called once . |
38,278 | public synchronized UndertowServerEngine retrieveHttpServerEngine ( int port ) { UndertowServerEngine engine = null ; synchronized ( portMap ) { engine = portMap . get ( port ) ; } return engine ; } | Retrieve a previously configured HttpServerEngine for the given port . If none exists this call returns null . |
38,279 | public synchronized void destroyForPort ( int port ) { synchronized ( portMap ) { UndertowServerEngine ref = portMap . remove ( port ) ; if ( ref != null ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Stopping HttpServer Engine on port " + port + "." ) ; } try { ref . stop ( ) ; } catch ( Exception e ) { LOG . wa... | This method removes the Server Engine from the port map and stops it . |
38,280 | public synchronized void shutdown ( ) { if ( factory != null && handlerCount == 0 ) { factory . destroyForPort ( port ) ; } else { LOG . warnv ( "Failed to shutdown Undertow server on port {0,number,####0} because it is still in use" , port ) ; } } | This method will shut down the server engine and remove it from the factory s cache . |
38,281 | protected void configureEndpointFactory ( AbstractWSDLBasedEndpointFactory factory ) { if ( customization != null ) { ReflectionServiceFactoryBean serviceFactory = factory . getServiceFactory ( ) ; serviceFactory . reset ( ) ; DataBinding serviceFactoryDataBinding = serviceFactory . getDataBinding ( true ) ; configureB... | Configure the endpoint factory |
38,282 | public MAP inboundMap ( Map < String , Object > ctx ) { AddressingProperties implementation = ( AddressingProperties ) ctx . get ( CXFMAPConstants . SERVER_ADDRESSING_PROPERTIES_INBOUND ) ; return newMap ( implementation ) ; } | retrieve the inbound server message address properties attached to a message context |
38,283 | public MAP outboundMap ( Map < String , Object > ctx ) { AddressingProperties implementation = ( AddressingProperties ) ctx . get ( CXFMAPConstants . CLIENT_ADDRESSING_PROPERTIES_OUTBOUND ) ; if ( implementation == null ) { implementation = new AddressingProperties ( ) ; ctx . put ( CXFMAPConstants . CLIENT_ADDRESSING_... | retrieve the outbound client message address properties attached to a message request map |
38,284 | public void publishWsdlFiles ( QName serviceName , String wsdlLocation , Bus bus , List < ServiceInfo > serviceInfos ) throws IOException { String deploymentName = dep . getCanonicalName ( ) ; File wsdlFile = getPublishLocation ( serviceName . getLocalPart ( ) , deploymentName , wsdlLocation ) ; if ( wsdlFile == null )... | Publish the deployed wsdl file to the data directory |
38,285 | private File getPublishLocation ( String serviceName , String archiveName , String wsdlLocation ) throws IOException { if ( wsdlLocation == null && serviceName == null ) { Loggers . DEPLOYMENT_LOGGER . cannotGetWsdlPublishLocation ( ) ; return null ; } if ( archiveName . startsWith ( "http://" ) ) { archiveName = archi... | Get the file publish location |
38,286 | public MessageBroker processAfterStartup ( MessageBroker broker ) { Service service = broker . getServiceByType ( getServiceClassName ( ) ) ; Assert . notNull ( service , "The MessageBroker with id '" + broker . getId ( ) + "' does not have a service of type " + getServiceClassName ( ) + " configured." ) ; Assert . isT... | Error checking is done on the started MessageBroker to ensure configuration was successful . |
38,287 | public MessageBroker processBeforeStartup ( MessageBroker broker ) { Service service = broker . getServiceByType ( getServiceClassName ( ) ) ; if ( service == null ) { service = broker . createService ( getServiceId ( ) , getServiceClassName ( ) ) ; if ( getServiceAdapterId ( ) . equals ( this . defaultAdapterId ) ) { ... | The MessageBroker is checked to see if the Service has already been configured via the BlazeDS XML config . If no existing Service is found one will be installed using the defined configuration properties of this class . |
38,288 | @ SuppressWarnings ( "rawtypes" ) protected String extractPassword ( Object credentials ) { String password = null ; if ( credentials instanceof String ) { password = ( String ) credentials ; } else if ( credentials instanceof Map ) { password = ( String ) ( ( Map ) credentials ) . get ( MessageIOConstants . SECURITY_C... | Extracts the password from the Flex client credentials |
38,289 | void handleMessage ( Message flexMessage ) { flexMessage . setDestination ( this . getDestination ( ) . getId ( ) ) ; MessageService messageService = ( MessageService ) getDestination ( ) . getService ( ) ; messageService . pushMessageToClients ( flexMessage , true ) ; messageService . sendPushMessageFromPeer ( flexMes... | Invoked when a Message is received from a JMS client . |
38,290 | public void findDefaultChannel ( MessageBroker broker , Service service ) { if ( ! CollectionUtils . isEmpty ( broker . getDefaultChannels ( ) ) ) { return ; } Iterator < String > channels = broker . getChannelIds ( ) . iterator ( ) ; while ( channels . hasNext ( ) ) { Endpoint endpoint = broker . getEndpoint ( channel... | Tries to find a sensible default AMF channel for the default MessageService |
38,291 | protected void configureAdapter ( Destination destination ) { String adapterId = StringUtils . hasText ( this . serviceAdapter ) ? this . serviceAdapter : getTargetService ( this . broker ) . getDefaultAdapter ( ) ; if ( this . beanFactory . containsBean ( adapterId ) ) { ServiceAdapter adapter = ( ServiceAdapter ) thi... | Configure the service adapter for the destination . |
38,292 | @ SuppressWarnings ( "unchecked" ) public MessagingConfiguration getMessagingConfiguration ( ServletConfig servletConfig ) { Assert . isTrue ( JdkVersion . getMajorJavaVersion ( ) >= JdkVersion . JAVA_15 , "Spring BlazeDS Integration requires a minimum of Java 1.5" ) ; Assert . notNull ( servletConfig , "FlexConfigurat... | Parses the BlazeDS config files and returns a populated MessagingConfiguration |
38,293 | public static SpringPropertyProxy proxyFor ( Class < ? > beanType , boolean useDirectFieldAccess , ConversionService conversionService ) { if ( PropertyProxyUtils . hasAmfCreator ( beanType ) ) { SpringPropertyProxy proxy = new DelayedWriteSpringPropertyProxy ( beanType , useDirectFieldAccess , conversionService ) ; re... | Factory method for creating correctly configured Spring property proxy instances . |
38,294 | public void handleMessage ( Message < ? > message ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "received Integration Message: " + message ) ; } AsyncMessage flexMessage = new AsyncMessage ( ) ; flexMessage . setBody ( message . getPayload ( ) ) ; MessageHeaders headers = message . getHeaders ( ) ; flexMess... | Invoked when a Message is received from the Spring Integration channel . |
38,295 | @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public Object invoke ( flex . messaging . messages . Message flexMessage ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "received Flex Message: " + flexMessage ) ; } Message < ? > message = null ; if ( this . extractPayload ) { Map headers = flexMessage . g... | Invoked when a Message is received from a Flex client . |
38,296 | public void send ( String destination , Object body ) { AsyncMessage message = this . defaultMessageCreator . createMessage ( ) ; message . setDestination ( destination ) ; message . setBody ( body ) ; getMessageBroker ( ) . routeMessageToService ( message , null ) ; } | Sends a message with the specified body to the specified destination |
38,297 | public void afterThrowing ( Throwable original ) throws Throwable { Class < ? > candidateType = original . getClass ( ) ; Throwable candidate = original ; if ( ClassUtils . isAssignable ( MessageException . class , candidateType ) ) { MessageException me = ( MessageException ) candidate ; if ( SERVER_PROCESSING_CODE . ... | Apply translation to the thrown exception . |
38,298 | public String getQualifiedName ( ) { if ( this . module == null || this . module . getName ( ) == null ) { return name ; } if ( this . module . getName ( ) . equals ( "core" ) || this . module . getName ( ) . equals ( "filters" ) || this . module . getName ( ) . equals ( "elements" ) ) { return "kurento." + name ; } el... | Get qualified name mixing In the format module . name |
38,299 | public boolean satisfies ( String expr ) { Parser < Expression > parser = ExpressionParser . newInstance ( ) ; return parser . parse ( expr ) . interpret ( this ) ; } | Checks if this version satisfies the specified SemVer Expression . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.