Tabnine Logo
JobContext.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.springframework.batch.core.scope.context.JobContext
constructor

Best Java code snippets using org.springframework.batch.core.scope.context.JobContext.<init> (Showing top 10 results out of 315)

origin: spring-projects/spring-batch

@Override
protected JobContext createNewContext(JobExecution execution, BatchPropertyContext args) {
  return new JobContext(execution);
}
origin: spring-projects/spring-batch

@Test
public void testNullJobExecution() {
  try {
    context = new JobContext(null);
    fail("Expected IllegalArgumentException");
  }
  catch (IllegalArgumentException e) {
    // expected
  }
}
origin: spring-projects/spring-batch

@Test
public void testEqualsContextWithSameJobExecution() {
  assertEquals(new JobContext(jobExecution), context);
}
origin: spring-projects/spring-batch

@Before
public void setUp() {
  jobExecution = new JobExecution(1L);
  JobInstance jobInstance = new JobInstance(2L, "job");
  jobExecution.setJobInstance(jobInstance);
  context = new JobContext(jobExecution);
  list = new ArrayList<>();
}
origin: spring-projects/spring-batch

@Test
public void testGetJobExecution() {
  context = new JobContext(jobExecution);
  assertNotNull(context.getJobExecution());
}
origin: spring-projects/spring-batch

@Test(expected = IllegalStateException.class)
public void testIllegalContextId() throws Exception {
  context = new JobContext(new JobExecution((Long) null));
  context.getId();
}
origin: spring-projects/spring-batch

@Test
public void testJobParameters() throws Exception {
  JobParameters jobParameters = new JobParametersBuilder().addString("foo", "bar").toJobParameters();
  JobInstance jobInstance = new JobInstance(0L, "foo");
  jobExecution = new JobExecution(5L, jobParameters);
  jobExecution.setJobInstance(jobInstance);
  context = new JobContext(jobExecution);
  assertEquals("bar", context.getJobParameters().get("foo"));
}
origin: apache/servicemix-bundles

@Override
protected JobContext createNewContext(JobExecution execution, BatchPropertyContext args) {
  return new JobContext(execution);
}
origin: org.springframework.batch/spring-batch-core

@Override
protected JobContext createNewContext(JobExecution execution, BatchPropertyContext args) {
  return new JobContext(execution);
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

@Override
protected JobContext createNewContext(JobExecution execution, BatchPropertyContext args) {
  return new JobContext(execution);
}
org.springframework.batch.core.scope.contextJobContext<init>

Popular methods of JobContext

  • getJobExecutionContext
  • getJobParameters
  • close
    Clean up the context at the end of a step execution. Must be called once at the end of a step execut
  • getAttribute
  • getId
  • registerDestructionCallback
    Allow clients to register callbacks for clean up on close.
  • setAttribute
  • removeAttribute
    Override base class behaviour to ensure destruction callbacks are unregistered as well as the defaul
  • unregisterDestructionCallbacks
  • attributeNames
  • equals
    Extend the base class method to include the job execution itself as a key (i.e. two contexts are onl
  • getJobExecution
    The current JobExecution that is active in this context.
  • equals,
  • getJobExecution,
  • getJobName,
  • getSystemProperties,
  • hasAttribute

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now