Tabnine Logo
JobListenerFactoryBean.getListener
Code IndexAdd Tabnine to your IDE (free)

How to use
getListener
method
in
org.springframework.batch.core.listener.JobListenerFactoryBean

Best Java code snippets using org.springframework.batch.core.listener.JobListenerFactoryBean.getListener (Showing top 4 results out of 315)

origin: spring-projects/spring-batch

@Test
public void testEqualityOfProxies() throws Exception {
  JobListenerWithInterface delegate = new JobListenerWithInterface();
  Object listener1 = JobListenerFactoryBean.getListener(delegate);
  Object listener2 = JobListenerFactoryBean.getListener(delegate);
  assertEquals(listener1, listener2);
}
origin: spring-projects/spring-batch

@Test
public void testUseInHashSet() throws Exception {
  JobListenerWithInterface delegate = new JobListenerWithInterface();
  Object listener = JobListenerFactoryBean.getListener(delegate);
  Object other = JobListenerFactoryBean.getListener(delegate);
  assertTrue(listener instanceof JobExecutionListener);
  Set<JobExecutionListener> listeners = new HashSet<>();
  listeners.add((JobExecutionListener) listener);
  listeners.add((JobExecutionListener) other);
  assertTrue(listeners.contains(listener));
  assertEquals(1, listeners.size());
}
origin: spring-projects/spring-batch

@Test
public void testAnnotationsWithOrdered() throws Exception {
  Object delegate = new Ordered() {
    @BeforeJob
    public void foo(JobExecution execution) {
    }
    @Override
    public int getOrder() {
      return 3;
    }
  };
  JobExecutionListener listener = JobListenerFactoryBean.getListener(delegate);
  assertTrue("Listener is not of correct type", listener instanceof Ordered);
  assertEquals(3, ((Ordered) listener).getOrder());
}
origin: spring-projects/spring-batch

@Test
public void testFactoryMethod() throws Exception {
  JobListenerWithInterface delegate = new JobListenerWithInterface();
  Object listener = JobListenerFactoryBean.getListener(delegate);
  assertTrue(listener instanceof JobExecutionListener);
  ((JobExecutionListener) listener).afterJob(new JobExecution(11L));
  assertTrue(delegate.afterJobCalled);
}
org.springframework.batch.core.listenerJobListenerFactoryBeangetListener

Javadoc

Convenience method to wrap any object and expose the appropriate JobExecutionListener interfaces.

Popular methods of JobListenerFactoryBean

  • <init>
  • getObject
  • setDelegate
  • isListener
    Convenience method to check whether the given object is or can be made into a JobExecutionListener.
  • setMetaDataMap

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • From CI to AI: The AI layer in your organization
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