com.atlassian.sal.confluence.lifecycle
Class ServiceExecutionTemplate<S,R>

java.lang.Object
  extended by com.atlassian.sal.confluence.lifecycle.ServiceExecutionTemplate<S,R>
Type Parameters:
S - the service getting executed
R - the result of the service execution
All Implemented Interfaces:
Callable<com.atlassian.fugue.Option<R>>
Direct Known Subclasses:
StaticServiceExecution

public abstract class ServiceExecutionTemplate<S,R>
extends Object
implements Callable<com.atlassian.fugue.Option<R>>

Template for service executions.

Since:
5.6

Field Summary
protected  org.osgi.framework.ServiceReference serviceReference
           
 
Constructor Summary
ServiceExecutionTemplate(org.osgi.framework.ServiceReference serviceReference)
           
 
Method Summary
 com.atlassian.fugue.Option<R> call()
           
protected abstract  R execute(S service)
           
protected  String serviceReferenceToString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceReference

protected final org.osgi.framework.ServiceReference serviceReference
Constructor Detail

ServiceExecutionTemplate

public ServiceExecutionTemplate(org.osgi.framework.ServiceReference serviceReference)
Method Detail

serviceReferenceToString

protected String serviceReferenceToString()

call

public com.atlassian.fugue.Option<R> call()
                                   throws Exception
Specified by:
call in interface Callable<com.atlassian.fugue.Option<R>>
Throws:
Exception

execute

protected abstract R execute(S service)


Copyright © 2003–2015 Atlassian. All rights reserved.