Class Change
- java.lang.Object
-
- org.ops4j.pax.web.service.spi.task.Change
-
- Direct Known Subclasses:
ClearDynamicRegistrationsChange
,ContainerInitializerModelChange
,ContextMetadataModelChange
,ContextParamsChange
,ContextStartChange
,ContextStopChange
,ErrorPageModelChange
,ErrorPageStateChange
,EventListenerModelChange
,FilterModelChange
,FilterStateChange
,MimeAndLocaleMappingChange
,OsgiContextModelChange
,SecurityConfigChange
,ServletContextModelChange
,ServletModelChange
,TransactionStateChange
,WebSocketModelChange
,WelcomeFileModelChange
public abstract class Change extends Object
Single operation to be performed within aBatch
. For now it has two purposes:- Global model alteration
- Interaction with
ServerController
to turn model changes into actual server runtime (re)configuration operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
accept(BatchVisitor visitor)
Perform an operation in acceptor-visitor pattern.Change
getBatchCompletedAction()
List<OsgiContextModel>
getContextModels()
Get a list of associated context models.OpCode
getKind()
void
registerBatchCompletedAction(Change action)
If during action/change handling, the visitor (action invoker) decides there's another action to perform but in separate thread (next "tick" of single event thread), this is the way to register such action.void
uninstall(List<Change> operations)
-
-
-
Constructor Detail
-
Change
public Change(OpCode kind)
-
-
Method Detail
-
getKind
public OpCode getKind()
-
accept
public abstract void accept(BatchVisitor visitor)
Perform an operation in acceptor-visitor pattern.- Parameters:
visitor
-
-
getContextModels
public List<OsgiContextModel> getContextModels()
Get a list of associated context models.
Usually the list comes from associated model being ADDed and usually doesn't make sense when a change concerns more models. Special scenario is to get a list of new context models associated with existing element model after it has been removed (from previous list of associated contexts) in the same
Batch
.- Returns:
-
uninstall
public void uninstall(List<Change> operations)
AChange
may be reversed, which is handy when rolling back existingBatch
. A single change may be a no-op during uninstallation (like for example welcome files), but also may consist of more uninstallation changes - likeOsgiContextModelChange
which has to follow unregistrations of dynamic servlets/filters/listeners.
-
registerBatchCompletedAction
public void registerBatchCompletedAction(Change action)
If during action/change handling, the visitor (action invoker) decides there's another action to perform but in separate thread (next "tick" of single event thread), this is the way to register such action.- Parameters:
action
-
-
getBatchCompletedAction
public Change getBatchCompletedAction()
-
-