idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
152,200
public boolean waitForConnectorFinished ( ) throws InterruptedException { connectorStatusLock . lock ( ) ; try { if ( connectorStatus == ConnectorStatus . ConnectorSuccesful ) { return true ; } return connectorSuccessfullyFinished . await ( discoveryQos . getDiscoveryTimeoutMs ( ) , TimeUnit . MILLISECONDS ) ; } finall...
Checks the connector status before a method call is executed . Instantly returns True if the connector already finished successfully otherwise it will block up to the amount of milliseconds defined by the arbitrationTimeout or until the ProxyInvocationHandler is notified about a successful connection .
152,201
public boolean isConnectorReady ( ) { connectorStatusLock . lock ( ) ; try { if ( connectorStatus == ConnectorStatus . ConnectorSuccesful ) { return true ; } return false ; } finally { connectorStatusLock . unlock ( ) ; } }
Checks if the connector was set successfully . Returns immediately and does not block until the connector is finished .
152,202
private void sendQueuedInvocations ( ) { while ( true ) { MethodInvocation < ? > currentRPC = queuedRpcList . poll ( ) ; if ( currentRPC == null ) { return ; } try { connector . executeAsyncMethod ( currentRPC . getProxy ( ) , currentRPC . getMethod ( ) , currentRPC . getArgs ( ) , currentRPC . getFuture ( ) ) ; } catc...
Executes previously queued remote calls . This method is called when arbitration is completed .
152,203
public void createConnector ( ArbitrationResult result ) { connector = connectorFactory . create ( proxyParticipantId , result , qosSettings , statelessAsyncParticipantId ) ; connectorStatusLock . lock ( ) ; try { connectorStatus = ConnectorStatus . ConnectorSuccesful ; connectorSuccessfullyFinished . signalAll ( ) ; i...
Sets the connector for this ProxyInvocationHandler after the DiscoveryAgent got notified about a successful arbitration . Should be called from the DiscoveryAgent
152,204
@ Produces ( { MediaType . TEXT_PLAIN } ) public String getTime ( ) { return String . valueOf ( System . currentTimeMillis ( ) ) ; }
get server time in ms
152,205
public static int findFreePort ( ) throws IOException { ServerSocket socket = null ; try { socket = new ServerSocket ( 0 ) ; return socket . getLocalPort ( ) ; } finally { if ( socket != null ) { socket . close ( ) ; } } }
Find a free port on the test system to be used by the servlet engine
152,206
@ Path ( "/clusters/{clusterid: ([A-Z,a-z,0-9,_,\\-]+)}" ) public Response migrateCluster ( @ PathParam ( "clusterid" ) final String clusterId ) { migrationService . startClusterMigration ( clusterId ) ; return Response . status ( 202 ) . build ( ) ; }
Migrates all bounce proxies of one cluster to a different cluster .
152,207
public String buildReportStartupUrl ( ControlledBounceProxyUrl controlledBounceProxyUrl ) throws UnsupportedEncodingException { String url4cc = URLEncoder . encode ( controlledBounceProxyUrl . getOwnUrlForClusterControllers ( ) , "UTF-8" ) ; String url4bpc = URLEncoder . encode ( controlledBounceProxyUrl . getOwnUrlFor...
Returns the URL including query parameters to report bounce proxy startup .
152,208
@ Consumes ( { MediaType . APPLICATION_OCTET_STREAM } ) public Response postMessageWithoutContentType ( @ PathParam ( "ccid" ) String ccid , byte [ ] serializedMessage ) throws IOException { ImmutableMessage message ; try { message = new ImmutableMessage ( serializedMessage ) ; } catch ( EncodingException | Unsuppporte...
Send a message to the given cluster controller like the above method postMessage
152,209
public SubscriptionQos setValidityMs ( final long validityMs ) { if ( validityMs == - 1 ) { setExpiryDateMs ( NO_EXPIRY_DATE ) ; } else { long now = System . currentTimeMillis ( ) ; this . expiryDateMs = now + validityMs ; } return this ; }
Set how long the subscription should run for in milliseconds . This is a helper method that allows setting the expiryDate using a relative time .
152,210
public List < ChannelInformation > listChannels ( ) { LinkedList < ChannelInformation > entries = new LinkedList < ChannelInformation > ( ) ; Collection < Broadcaster > broadcasters = BroadcasterFactory . getDefault ( ) . lookupAll ( ) ; String name ; for ( Broadcaster broadcaster : broadcasters ) { if ( broadcaster in...
Gets a list of all channel information .
152,211
public String createChannel ( String ccid , String atmosphereTrackingId ) { throwExceptionIfTrackingIdnotSet ( atmosphereTrackingId ) ; log . info ( "CREATE channel for cluster controller: {} trackingId: {} " , ccid , atmosphereTrackingId ) ; Broadcaster broadcaster = null ; BroadcasterFactory defaultBroadcasterFactory...
Creates a long polling channel .
152,212
public boolean deleteChannel ( String ccid ) { log . info ( "DELETE channel for cluster controller: " + ccid ) ; Broadcaster broadcaster = BroadcasterFactory . getDefault ( ) . lookup ( Broadcaster . class , ccid , false ) ; if ( broadcaster == null ) { return false ; } BroadcasterFactory . getDefault ( ) . remove ( cc...
Deletes a channel from the broadcaster .
152,213
public String postMessage ( String ccid , byte [ ] serializedMessage ) { ImmutableMessage message ; try { message = new ImmutableMessage ( serializedMessage ) ; } catch ( EncodingException | UnsuppportedVersionException e ) { throw new JoynrHttpException ( Status . BAD_REQUEST , JOYNRMESSAGINGERROR_DESERIALIZATIONFAILE...
Posts a message to a long polling channel .
152,214
private void asyncGetGlobalCapabilitities ( final String [ ] domains , final String interfaceName , Collection < DiscoveryEntryWithMetaInfo > localDiscoveryEntries2 , long discoveryTimeout , final CapabilitiesCallback capabilitiesCallback ) { final Collection < DiscoveryEntryWithMetaInfo > localDiscoveryEntries = local...
mixes in the localDiscoveryEntries to global capabilities found by participantId
152,215
public static boolean isSessionEncodedInUrl ( String encodedUrl , String sessionIdName ) { int sessionIdIndex = encodedUrl . indexOf ( getSessionIdSubstring ( sessionIdName ) ) ; return sessionIdIndex >= 0 ; }
Returns whether the session ID is encoded into the URL .
152,216
public static String getUrlWithoutSessionId ( String url , String sessionIdName ) { if ( isSessionEncodedInUrl ( url , sessionIdName ) ) { return url . substring ( 0 , url . indexOf ( getSessionIdSubstring ( sessionIdName ) ) ) ; } return url ; }
Returns the URL without the session encoded into the URL .
152,217
public static String getSessionEncodedUrl ( String url , String sessionIdName , String sessionId ) { return url + getSessionIdSubstring ( sessionIdName ) + sessionId ; }
Returns a url with the session encoded into the URL
152,218
private void stopPublicationByProviderId ( String providerParticipantId ) { for ( PublicationInformation publicationInformation : subscriptionId2PublicationInformation . values ( ) ) { if ( publicationInformation . getProviderParticipantId ( ) . equals ( providerParticipantId ) ) { removePublication ( publicationInform...
Stops all publications for a provider
152,219
private void restoreQueuedSubscription ( String providerId , ProviderContainer providerContainer ) { Collection < PublicationInformation > queuedRequests = queuedSubscriptionRequests . get ( providerId ) ; Iterator < PublicationInformation > queuedRequestsIterator = queuedRequests . iterator ( ) ; while ( queuedRequest...
Called every time a provider is registered to check whether there are already subscriptionRequests waiting .
152,220
public static URI createChannelLocation ( ControlledBounceProxyInformation bpInfo , String ccid , URI location ) { return URI . create ( location . toString ( ) + ";jsessionid=." + bpInfo . getInstanceId ( ) ) ; }
Creates the channel location that is returned to the cluster controller . This includes tweaking of the URL for example to contain a session ID .
152,221
@ Produces ( "application/json" ) public GenericEntity < List < ChannelInformation > > listChannels ( ) { try { return new GenericEntity < List < ChannelInformation > > ( channelService . listChannels ( ) ) { } ; } catch ( Exception e ) { log . error ( "GET channels listChannels: error: {}" , e . getMessage ( ) , e ) ;...
A simple HTML list view of channels . A JSP is used for rendering .
152,222
@ Path ( "/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}" ) @ Produces ( { MediaType . APPLICATION_JSON } ) @ Suspend ( resumeOnBroadcast = true , period = ChannelServiceConstants . EXPIRE_TIME_CONNECTION , timeUnit = TimeUnit . SECONDS , contentType = MediaType . APPLICATION_JSON ) public Broadcastable open ( @ PathParam ( "ccid" ...
Open a long poll channel for the given cluster controller . The channel is closed automatically by the server at regular intervals to ensure liveliness .
152,223
@ Produces ( { MediaType . TEXT_PLAIN } ) public Response createChannel ( @ QueryParam ( "ccid" ) String ccid , @ HeaderParam ( ChannelServiceConstants . X_ATMOSPHERE_TRACKING_ID ) String atmosphereTrackingId ) { try { log . info ( "CREATE channel for channel ID: {}" , ccid ) ; if ( ccid == null || ccid . isEmpty ( ) )...
HTTP POST to create a channel returns location to new resource which can then be long polled . Since the channel id may later change to be a UUID not using a PUT but rather POST with used id being returned
152,224
@ Path ( "/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}" ) public Response deleteChannel ( @ PathParam ( "ccid" ) String ccid ) { try { log . info ( "DELETE channel for cluster controller: {}" , ccid ) ; if ( channelService . deleteChannel ( ccid ) ) { return Response . ok ( ) . build ( ) ; } return Response . noContent ( ) . buil...
Remove the channel for the given cluster controller .
152,225
private synchronized boolean createChannel ( ) { final String url = settings . getBounceProxyUrl ( ) . buildCreateChannelUrl ( channelId ) ; HttpPost postCreateChannel = httpRequestFactory . createHttpPost ( URI . create ( url . trim ( ) ) ) ; postCreateChannel . setConfig ( defaultRequestConfig ) ; postCreateChannel ....
Create a new channel for the given cluster controller id . If a channel already exists it is returned instead .
152,226
public static List < List < Annotation > > findAndMergeParameterAnnotations ( Method method ) { List < List < Annotation > > res = new ArrayList < List < Annotation > > ( method . getParameterTypes ( ) . length ) ; for ( int i = 0 ; i < method . getParameterTypes ( ) . length ; i ++ ) { res . add ( new LinkedList < Ann...
Utility function to find all annotations on the parameters of the specified method and merge them with the same annotations on all base classes and interfaces .
152,227
private static boolean areMethodNameAndParameterTypesEqual ( Method methodA , Method methodB ) { if ( ! methodA . getName ( ) . equals ( methodB . getName ( ) ) ) { return false ; } Class < ? > [ ] methodAParameterTypes = methodA . getParameterTypes ( ) ; Class < ? > [ ] methodBParameterTypes = methodB . getParameterTy...
Compares to methods for equality based on name and parameter types .
152,228
protected void arbitrationFinished ( ArbitrationStatus arbitrationStatus , ArbitrationResult arbitrationResult ) { this . arbitrationStatus = arbitrationStatus ; this . arbitrationResult = arbitrationResult ; if ( arbitrationListenerSemaphore . tryAcquire ( ) ) { arbitrationListener . onSuccess ( arbitrationResult ) ; ...
Sets the arbitration result at the arbitrationListener if the listener is already registered
152,229
public Future < Void > registerProvider ( String domain , Object provider , ProviderQos providerQos , boolean awaitGlobalRegistration , final Class < ? > interfaceClass ) { if ( interfaceClass == null ) { throw new IllegalArgumentException ( "Cannot registerProvider: interfaceClass may not be NULL" ) ; } registerInterf...
Registers a provider in the joynr framework by JEE
152,230
public void setStatus ( BounceProxyStatus status ) throws IllegalStateException { if ( this . status . isValidTransition ( status ) ) { this . status = status ; } else { throw new IllegalStateException ( "Illegal status transition from " + this . status + " to " + status ) ; } }
Sets the status of the bounce proxy .
152,231
@ Produces ( { MediaType . APPLICATION_OCTET_STREAM } ) public Response postMessage ( @ PathParam ( "ccid" ) String ccid , byte [ ] serializedMessage ) { ImmutableMessage message ; try { message = new ImmutableMessage ( serializedMessage ) ; } catch ( EncodingException | UnsuppportedVersionException e ) { throw new Joy...
Send a message .
152,232
public static Arbitrator create ( final Set < String > domains , final String interfaceName , final Version interfaceVersion , final DiscoveryQos discoveryQos , DiscoveryAsync localDiscoveryAggregator ) throws DiscoveryException { ArbitrationStrategyFunction arbitrationStrategyFunction ; switch ( discoveryQos . getArbi...
Creates an arbitrator defined by the arbitrationStrategy set in the discoveryQos .
152,233
public static Properties loadProperties ( String fileName ) { LowerCaseProperties properties = new LowerCaseProperties ( ) ; ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; URL url = classLoader . getResource ( fileName ) ; if ( url != null ) { InputStream urlStream = null ; try { url...
load properties from file
152,234
@ Produces ( { MediaType . APPLICATION_JSON } ) public GenericEntity < List < BounceProxyStatusInformation > > getBounceProxies ( ) { return new GenericEntity < List < BounceProxyStatusInformation > > ( monitoringService . getRegisteredBounceProxies ( ) ) { } ; }
Returns a list of bounce proxies that are registered with the bounceproxy controller .
152,235
public URI createChannel ( ControlledBounceProxyInformation bpInfo , String ccid , String trackingId ) throws JoynrProtocolException { try { return createChannelLoop ( bpInfo , ccid , trackingId , sendCreateChannelMaxRetries ) ; } catch ( JoynrProtocolException e ) { logger . error ( "Unexpected bounce proxy behaviour:...
Creates a channel on the remote bounce proxy .
152,236
private URI createChannelLoop ( ControlledBounceProxyInformation bpInfo , String ccid , String trackingId , int retries ) throws JoynrProtocolException { while ( retries > 0 ) { retries -- ; try { return sendCreateChannelHttpRequest ( bpInfo , ccid , trackingId ) ; } catch ( IOException e ) { logger . error ( "creating...
Starts a loop to send createChannel requests to a bounce proxy with a maximum number of retries .
152,237
public void cancelReporting ( ) { if ( startupReportFuture != null ) { startupReportFuture . cancel ( true ) ; } if ( execService != null ) { execService . shutdownNow ( ) ; } }
Cancels startup reporting .
152,238
private void reportEventAsHttpRequest ( ) throws IOException { final String url = bounceProxyControllerUrl . buildReportStartupUrl ( controlledBounceProxyUrl ) ; logger . debug ( "Using monitoring service URL: {}" , url ) ; HttpPut putReportStartup = new HttpPut ( url . trim ( ) ) ; CloseableHttpResponse response = nul...
Reports the lifecycle event to the monitoring service as HTTP request .
152,239
private OnChangeSubscriptionQos setMinIntervalMsInternal ( final long minIntervalMs ) { if ( minIntervalMs < MIN_MIN_INTERVAL_MS ) { this . minIntervalMs = MIN_MIN_INTERVAL_MS ; logger . warn ( "minIntervalMs < MIN_MIN_INTERVAL_MS. Using MIN_MIN_INTERVAL_MS: {}" , MIN_MIN_INTERVAL_MS ) ; } else if ( minIntervalMs > MAX...
internal method required to prevent findbugs warning
152,240
private boolean hasRoleMaster ( String userId , String domain ) { DomainRoleEntry domainRole = domainAccessStore . getDomainRole ( userId , Role . MASTER ) ; if ( domainRole == null || ! Arrays . asList ( domainRole . getDomains ( ) ) . contains ( domain ) ) { return false ; } return true ; }
Indicates if the given user has master role for the given domain
152,241
public void put ( DelayableImmutableMessage delayableImmutableMessage ) { if ( messagePersister . persist ( messageQueueId , delayableImmutableMessage ) ) { logger . trace ( "Message {} was persisted for messageQueueId {}" , delayableImmutableMessage . getMessage ( ) , messageQueueId ) ; } else { logger . trace ( "Mess...
Add the passed in message to the queue of messages to be processed . Also offer the message for persisting .
152,242
public DelayableImmutableMessage poll ( long timeout , TimeUnit unit ) throws InterruptedException { DelayableImmutableMessage message = delayableImmutableMessages . poll ( timeout , unit ) ; if ( message != null ) { messagePersister . remove ( messageQueueId , message ) ; } return message ; }
Polls the message queue for a period no longer than the timeout specified for a new message .
152,243
public void startReporting ( ) { if ( executorService == null ) { throw new IllegalStateException ( "MonitoringServiceClient already shutdown" ) ; } if ( scheduledFuture != null ) { logger . error ( "only one performance reporting thread can be started" ) ; return ; } Runnable performanceReporterCallable = new Runnable...
Starts a reporting loop that sends performance measures to the monitoring service in a certain frequency .
152,244
private void sendPerformanceReportAsHttpRequest ( ) throws IOException { final String url = bounceProxyControllerUrl . buildReportPerformanceUrl ( ) ; logger . debug ( "Using monitoring service URL: {}" , url ) ; Map < String , Integer > performanceMap = bounceProxyPerformanceMonitor . getAsKeyValuePairs ( ) ; String s...
Sends an HTTP request to the monitoring service to report performance measures of a bounce proxy instance .
152,245
public boolean stopReporting ( ) { if ( scheduledFuture != null ) { return scheduledFuture . cancel ( false ) ; } executorService . shutdown ( ) ; executorService = null ; return false ; }
Stops the performance reporting loop .
152,246
public void setArbitrationStrategy ( ArbitrationStrategy arbitrationStrategy ) { if ( arbitrationStrategy . equals ( ArbitrationStrategy . Custom ) ) { throw new IllegalStateException ( "A Custom strategy can only be set by passing an arbitration strategy function to the DiscoveryQos constructor" ) ; } this . arbitrati...
The discovery process outputs a list of matching providers . The arbitration strategy then chooses one or more of them to be used by the proxy .
152,247
public void onSuccess ( T result ) { try { statusLock . lock ( ) ; value = result ; status = new RequestStatus ( RequestStatusCode . OK ) ; statusLockChangedCondition . signalAll ( ) ; } catch ( Exception e ) { status = new RequestStatus ( RequestStatusCode . ERROR ) ; exception = new JoynrRuntimeException ( e ) ; } fi...
Resolves the future using the given result
152,248
public void onFailure ( JoynrException newException ) { exception = newException ; status = new RequestStatus ( RequestStatusCode . ERROR ) ; try { statusLock . lock ( ) ; statusLockChangedCondition . signalAll ( ) ; } finally { statusLock . unlock ( ) ; } }
Terminates the future in error
152,249
public Set < Version > getDiscoveredVersionsForDomain ( String domain ) { Set < Version > result = new HashSet < > ( ) ; if ( hasExceptionForDomain ( domain ) ) { result . addAll ( exceptionsByDomain . get ( domain ) . getDiscoveredVersions ( ) ) ; } return result ; }
Returns the set of versions which were discovered for a given domain .
152,250
public ConnectorInvocationHandler create ( final String fromParticipantId , final ArbitrationResult arbitrationResult , final MessagingQos qosSettings , String statelessAsyncParticipantId ) { boolean isGloballyVisible = false ; Set < DiscoveryEntryWithMetaInfo > entries = arbitrationResult . getDiscoveryEntries ( ) ; f...
Creates a new connector object using concrete connector factories chosen by the endpointAddress which is passed in .
152,251
public void registerAttributeListener ( String attributeName , AttributeListener attributeListener ) { attributeListeners . putIfAbsent ( attributeName , new ArrayList < AttributeListener > ( ) ) ; List < AttributeListener > listeners = attributeListeners . get ( attributeName ) ; synchronized ( listeners ) { listeners...
Registers an attribute listener that gets notified in case the attribute changes . This is used for on change subscriptions .
152,252
public void unregisterAttributeListener ( String attributeName , AttributeListener attributeListener ) { List < AttributeListener > listeners = attributeListeners . get ( attributeName ) ; if ( listeners == null ) { LOG . error ( "trying to unregister an attribute listener for attribute \"" + attributeName + "\" that w...
Unregisters an attribute listener .
152,253
public void registerBroadcastListener ( String broadcastName , BroadcastListener broadcastListener ) { broadcastListeners . putIfAbsent ( broadcastName , new ArrayList < BroadcastListener > ( ) ) ; List < BroadcastListener > listeners = broadcastListeners . get ( broadcastName ) ; synchronized ( listeners ) { listeners...
Registers a broadcast listener that gets notified in case the broadcast is fired .
152,254
public void unregisterBroadcastListener ( String broadcastName , BroadcastListener broadcastListener ) { List < BroadcastListener > listeners = broadcastListeners . get ( broadcastName ) ; if ( listeners == null ) { LOG . error ( "trying to unregister a listener for broadcast \"" + broadcastName + "\" that was never re...
Unregisters a broadcast listener .
152,255
public void addBroadcastFilter ( BroadcastFilterImpl filter ) { if ( broadcastFilters . containsKey ( filter . getName ( ) ) ) { broadcastFilters . get ( filter . getName ( ) ) . add ( filter ) ; } else { ArrayList < BroadcastFilter > list = new ArrayList < BroadcastFilter > ( ) ; list . add ( filter ) ; broadcastFilte...
Adds a broadcast filter to the provider . The filter is specific for a single broadcast as defined in the Franca model . It will be executed once for each subscribed client whenever the broadcast is fired . Clients set individual filter parameters to control filter behavior .
152,256
public void addBroadcastFilter ( BroadcastFilterImpl ... filters ) { List < BroadcastFilterImpl > filtersList = Arrays . asList ( filters ) ; for ( BroadcastFilterImpl filter : filtersList ) { addBroadcastFilter ( filter ) ; } }
Adds multiple broadcast filters to the provider .
152,257
public Object [ ] getValues ( long timeout ) throws InterruptedException { if ( ! isSettled ( ) ) { synchronized ( this ) { wait ( timeout ) ; } } if ( values == null ) { return null ; } return Arrays . copyOf ( values , values . length ) ; }
Get the resolved values of the promise . If the promise is not settled the call blocks until the promise is settled or timeout is reached .
152,258
private void getCapabilityEntry ( ImmutableMessage message , CapabilityCallback callback ) { long cacheMaxAge = Long . MAX_VALUE ; DiscoveryQos discoveryQos = new DiscoveryQos ( DiscoveryQos . NO_MAX_AGE , ArbitrationStrategy . NotSet , cacheMaxAge , DiscoveryScope . LOCAL_THEN_GLOBAL ) ; String participantId = message...
Get the capability entry for the given message
152,259
public static void copyDirectory ( File sourceLocation , File targetLocation ) throws IOException { if ( sourceLocation . isDirectory ( ) ) { if ( ! targetLocation . exists ( ) ) { if ( targetLocation . mkdir ( ) == false ) { logger . debug ( "Creating target directory " + targetLocation + " failed." ) ; } } String [ ]...
If targetLocation does not exist it will be created .
152,260
public boolean check ( Version caller , Version provider ) { if ( caller == null || provider == null ) { throw new IllegalArgumentException ( format ( "Both caller (%s) and provider (%s) must be non-null." , caller , provider ) ) ; } if ( caller . getMajorVersion ( ) == null || caller . getMinorVersion ( ) == null || p...
Compatibility of two versions is defined as the caller and provider versions having the same major version and the provider having the same or a higher minor version as the caller .
152,261
public static GlobalDiscoveryEntry newGlobalDiscoveryEntry ( Version providerVesion , String domain , String interfaceName , String participantId , ProviderQos qos , Long lastSeenDateMs , Long expiryDateMs , String publicKeyId , Address address ) { return new GlobalDiscoveryEntry ( providerVesion , domain , interfaceNa...
CHECKSTYLE IGNORE ParameterNumber FOR NEXT 1 LINES
152,262
public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { if ( throwable != null ) { throw throwable ; } try { return invokeInternal ( proxy , method , args ) ; } catch ( Exception e ) { if ( this . throwable != null ) { logger . debug ( "exception caught: {} overridden by: {}" , e . ge...
The InvocationHandler invoke method is mapped to the ProxyInvocationHandler . invokeInternal
152,263
public B error ( String errorCode ) { ErrorEventDefinition errorEventDefinition = createErrorEventDefinition ( errorCode ) ; element . getEventDefinitions ( ) . add ( errorEventDefinition ) ; return myself ; }
Sets an error definition for the given error code . If already an error with this code exists it will be used otherwise a new error is created .
152,264
public B addExtensionElement ( BpmnModelElementInstance extensionElement ) { ExtensionElements extensionElements = getCreateSingleChild ( ExtensionElements . class ) ; extensionElements . addChildElement ( extensionElement ) ; return myself ; }
Add an extension element to the element .
152,265
public B camundaFailedJobRetryTimeCycle ( String retryTimeCycle ) { CamundaFailedJobRetryTimeCycle failedJobRetryTimeCycle = createInstance ( CamundaFailedJobRetryTimeCycle . class ) ; failedJobRetryTimeCycle . setTextContent ( retryTimeCycle ) ; addExtensionElement ( failedJobRetryTimeCycle ) ; return myself ; }
Sets the camunda failedJobRetryTimeCycle attribute for the build flow node .
152,266
public B message ( String messageName ) { Message message = findMessageForName ( messageName ) ; return message ( message ) ; }
Sets the message with the given message name . If already a message with this name exists it will be used otherwise a new message is created .
152,267
public B camundaOut ( String source , String target ) { CamundaOut param = modelInstance . newInstance ( CamundaOut . class ) ; param . setCamundaSource ( source ) ; param . setCamundaTarget ( target ) ; addExtensionElement ( param ) ; return myself ; }
Sets a camunda out parameter to pass a variable from a sub process instance to the super process instance
152,268
public B message ( String messageName ) { MessageEventDefinition messageEventDefinition = createMessageEventDefinition ( messageName ) ; element . getEventDefinitions ( ) . add ( messageEventDefinition ) ; return myself ; }
Sets an event definition for the given message name . If already a message with this name exists it will be used otherwise a new message is created .
152,269
public B signal ( String signalName ) { SignalEventDefinition signalEventDefinition = createSignalEventDefinition ( signalName ) ; element . getEventDefinitions ( ) . add ( signalEventDefinition ) ; return myself ; }
Sets an event definition for the given signal name . If already a signal with this name exists it will be used otherwise a new signal is created .
152,270
public B timerWithDate ( String timerDate ) { TimeDate timeDate = createInstance ( TimeDate . class ) ; timeDate . setTextContent ( timerDate ) ; TimerEventDefinition timerEventDefinition = createInstance ( TimerEventDefinition . class ) ; timerEventDefinition . setTimeDate ( timeDate ) ; element . getEventDefinitions ...
Sets an event definition for the timer with a time date .
152,271
public B timerWithDuration ( String timerDuration ) { TimeDuration timeDuration = createInstance ( TimeDuration . class ) ; timeDuration . setTextContent ( timerDuration ) ; TimerEventDefinition timerEventDefinition = createInstance ( TimerEventDefinition . class ) ; timerEventDefinition . setTimeDuration ( timeDuratio...
Sets an event definition for the timer with a time duration .
152,272
public B timerWithCycle ( String timerCycle ) { TimeCycle timeCycle = createInstance ( TimeCycle . class ) ; timeCycle . setTextContent ( timerCycle ) ; TimerEventDefinition timerEventDefinition = createInstance ( TimerEventDefinition . class ) ; timerEventDefinition . setTimeCycle ( timeCycle ) ; element . getEventDef...
Sets an event definition for the timer with a time cycle .
152,273
public SubProcessBuilder subProcessDone ( ) { BpmnModelElementInstance lastSubProcess = element . getScope ( ) ; if ( lastSubProcess != null && lastSubProcess instanceof SubProcess ) { return ( ( SubProcess ) lastSubProcess ) . builder ( ) ; } else { throw new BpmnModelException ( "Unable to find a parent subProcess." ...
Finishes the building of an embedded sub - process .
152,274
public B error ( ) { ErrorEventDefinition errorEventDefinition = createInstance ( ErrorEventDefinition . class ) ; element . getEventDefinitions ( ) . add ( errorEventDefinition ) ; return myself ; }
Sets a catch all error definition .
152,275
public ErrorEventDefinitionBuilder errorEventDefinition ( String id ) { ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition ( ) ; if ( id != null ) { errorEventDefinition . setId ( id ) ; } element . getEventDefinitions ( ) . add ( errorEventDefinition ) ; return new ErrorEventDefinitionBuilder ...
Creates an error event definition with an unique id and returns a builder for the error event definition .
152,276
public ErrorEventDefinitionBuilder errorEventDefinition ( ) { ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition ( ) ; element . getEventDefinitions ( ) . add ( errorEventDefinition ) ; return new ErrorEventDefinitionBuilder ( modelInstance , errorEventDefinition ) ; }
Creates an error event definition and returns a builder for the error event definition .
152,277
public B escalation ( ) { EscalationEventDefinition escalationEventDefinition = createInstance ( EscalationEventDefinition . class ) ; element . getEventDefinitions ( ) . add ( escalationEventDefinition ) ; return myself ; }
Sets a catch all escalation definition .
152,278
public B escalation ( String escalationCode ) { EscalationEventDefinition escalationEventDefinition = createEscalationEventDefinition ( escalationCode ) ; element . getEventDefinitions ( ) . add ( escalationEventDefinition ) ; return myself ; }
Sets an escalation definition for the given escalation code . If already an escalation with this code exists it will be used otherwise a new escalation is created .
152,279
public CamundaUserTaskFormFieldBuilder camundaFormField ( ) { CamundaFormData camundaFormData = getCreateSingleExtensionElement ( CamundaFormData . class ) ; CamundaFormField camundaFormField = createChild ( camundaFormData , CamundaFormField . class ) ; return new CamundaUserTaskFormFieldBuilder ( modelInstance , elem...
Creates a new camunda form field extension element .
152,280
public B activationCondition ( String conditionExpression ) { ActivationCondition activationCondition = createInstance ( ActivationCondition . class ) ; activationCondition . setTextContent ( conditionExpression ) ; element . setActivationCondition ( activationCondition ) ; return myself ; }
Sets the activation condition expression for the build complex gateway
152,281
public B cardinality ( String expression ) { LoopCardinality cardinality = getCreateSingleChild ( LoopCardinality . class ) ; cardinality . setTextContent ( expression ) ; return myself ; }
Sets the cardinality expression .
152,282
public B completionCondition ( String expression ) { CompletionCondition condition = getCreateSingleChild ( CompletionCondition . class ) ; condition . setTextContent ( expression ) ; return myself ; }
Sets the completion condition expression .
152,283
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public < T extends AbstractActivityBuilder > T multiInstanceDone ( ) { return ( T ) ( ( Activity ) element . getParentElement ( ) ) . builder ( ) ; }
Finishes the building of a multi instance loop characteristics .
152,284
public B condition ( String conditionText ) { Condition condition = createInstance ( Condition . class ) ; condition . setTextContent ( conditionText ) ; element . setCondition ( condition ) ; return myself ; }
Sets the condition of the conditional event definition .
152,285
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public < T extends AbstractFlowNodeBuilder > T conditionalEventDefinitionDone ( ) { return ( T ) ( ( Event ) element . getParentElement ( ) ) . builder ( ) ; }
Finishes the building of a conditional event definition .
152,286
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public < T extends AbstractFlowNodeBuilder > T errorEventDefinitionDone ( ) { return ( T ) ( ( Event ) element . getParentElement ( ) ) . builder ( ) ; }
Finishes the building of a error event definition .
152,287
public B camundaInputParameter ( String name , String value ) { CamundaInputOutput camundaInputOutput = getCreateSingleExtensionElement ( CamundaInputOutput . class ) ; CamundaInputParameter camundaInputParameter = createChild ( camundaInputOutput , CamundaInputParameter . class ) ; camundaInputParameter . setCamundaNa...
Creates a new camunda input parameter extension element with the given name and value .
152,288
public B camundaOutputParameter ( String name , String value ) { CamundaInputOutput camundaInputOutput = getCreateSingleExtensionElement ( CamundaInputOutput . class ) ; CamundaOutputParameter camundaOutputParameter = createChild ( camundaInputOutput , CamundaOutputParameter . class ) ; camundaOutputParameter . setCamu...
Creates a new camunda output parameter extension element with the given name and value .
152,289
public MessageEventDefinitionBuilder messageEventDefinition ( String id ) { MessageEventDefinition messageEventDefinition = createEmptyMessageEventDefinition ( ) ; if ( id != null ) { messageEventDefinition . setId ( id ) ; } element . getEventDefinitions ( ) . add ( messageEventDefinition ) ; return new MessageEventDe...
Creates an empty message event definition with the given id and returns a builder for the message event definition .
152,290
public SignalEventDefinitionBuilder signalEventDefinition ( String signalName ) { SignalEventDefinition signalEventDefinition = createSignalEventDefinition ( signalName ) ; element . getEventDefinitions ( ) . add ( signalEventDefinition ) ; return new SignalEventDefinitionBuilder ( modelInstance , signalEventDefinition...
Sets an event definition for the given Signal name . If a signal with this name already exists it will be used otherwise a new signal is created . It returns a builder for the Signal Event Definition .
152,291
public B from ( FlowNode source ) { element . setSource ( source ) ; source . getOutgoing ( ) . add ( element ) ; return myself ; }
Sets the source flow node of this sequence flow .
152,292
public B to ( FlowNode target ) { element . setTarget ( target ) ; target . getIncoming ( ) . add ( element ) ; return myself ; }
Sets the target flow node of this sequence flow .
152,293
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public < T extends AbstractFlowNodeBuilder > T messageEventDefinitionDone ( ) { return ( T ) ( ( Event ) element . getParentElement ( ) ) . builder ( ) ; }
Finishes the building of a message event definition .
152,294
public B compensation ( ) { CompensateEventDefinition compensateEventDefinition = createCompensateEventDefinition ( ) ; element . getEventDefinitions ( ) . add ( compensateEventDefinition ) ; return myself ; }
Sets a catch compensation definition .
152,295
public static void setSessionTicketKeys ( long ctx , SessionTicketKey [ ] keys ) { if ( keys == null || keys . length == 0 ) { throw new IllegalArgumentException ( "Length of the keys should be longer than 0." ) ; } byte [ ] binaryKeys = new byte [ keys . length * SessionTicketKey . TICKET_KEY_SIZE ] ; for ( int i = 0 ...
Set TLS session ticket keys .
152,296
private static String calculatePackagePrefix ( ) { String maybeShaded = Library . class . getName ( ) ; String expected = "io!netty!internal!tcnative!Library" . replace ( '!' , '.' ) ; if ( ! maybeShaded . endsWith ( expected ) ) { throw new UnsatisfiedLinkError ( String . format ( "Could not find prefix added to %s to...
The shading prefix added to this class s full name .
152,297
public static boolean initialize ( String libraryName , String engine ) throws Exception { if ( _instance == null ) { _instance = libraryName == null ? new Library ( ) : new Library ( libraryName ) ; if ( aprMajorVersion ( ) < 1 ) { throw new UnsatisfiedLinkError ( "Unsupported APR Version (" + aprVersionString ( ) + "...
Setup native library . This is the first method that must be called!
152,298
public static < S , R > List < R > convert ( List < S > source , Function < S , R > converter ) { return ( source == null ) ? null : source . stream ( ) . filter ( Objects :: nonNull ) . map ( converter ) . filter ( Objects :: nonNull ) . collect ( Collectors . toList ( ) ) ; }
Convert a list of a given type using converter .
152,299
public static ProcessHandler getDefaultHandler ( Logger logger ) { return LegacyProcessHandler . builder ( ) . addStdErrLineListener ( logger :: lifecycle ) . addStdOutLineListener ( logger :: lifecycle ) . setExitListener ( new NonZeroExceptionExitListener ( ) ) . build ( ) ; }
Create a return a new default configured process handler .