Tabnine Logo
AbstractCapability
Code IndexAdd Tabnine to your IDE (free)

How to use
AbstractCapability
in
org.apache.muse.core

Best Java code snippets using org.apache.muse.core.AbstractCapability (Showing top 8 results out of 315)

origin: org.n52.amused/amused-core

public String getInitializationParameter(String name)
{
  return (String)getInitializationParameters().get(name);
}

origin: org.n52.amused/amused-core

public void setMessageHandlers(Collection handlers)
{
  Iterator i = handlers.iterator();
  
  while (i.hasNext())
    setMessageHandler((MessageHandler)i.next());
}

origin: org.n52.amused/amused-wsrf-impl

public void setResource(Resource resource)
{
  Class theClass = resource.getClass();
  
  //
  // sanity check - only ws-resources should use ws-rf
  //
  if (!WsResource.class.isAssignableFrom(theClass))
  {
    Object[] filler = { theClass, WsResource.class };
    throw new RuntimeException(_MESSAGES.get("NotWSRF", filler));
  }
  
  super.setResource(resource);
}

origin: org.n52.amused/amused-wsx-impl

  public void initialize() 
    throws SoapFault
  {
    super.initialize();
    setMessageHandler(createGetMetadataHandler());
  }
}
origin: org.n52.amused/amused-core

public void initializeCompleted() 
  throws SoapFault
{
  Persistence persistence = getPersistence();
  
  //
  // if the capability defines a persistence mechanism, we 
  // should ask it to reload any saved data
  //
  if (persistence != null)
  {
    ResourceManager manager = getResource().getResourceManager();
    persistence.setResourceManager(manager);
    persistence.reload();
  }
}
origin: org.n52.amused/amused-wsdm-muws-adv-impl

public void initializeCompleted()
  throws SoapFault
{
  super.initializeCompleted();
  
  Resource resource = getResource();
  
  //
  // this allows the advertisement capability to hear about 
  // all resource lifecycle events that happen in the application
  //
  ResourceManager manager = resource.getResourceManager();
  manager.addListener(this);
      
  //
  // initialize the advertisement topics
  //
  NotificationProducer wsn = 
    (NotificationProducer)resource.getCapability(WsnConstants.PRODUCER_URI);
  
  wsn.addTopic(MuwsConstants.ADV_ME_CREATION_TOPIC);
  wsn.addTopic(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC);
  
  //
  // create subscriptions for all event consumer that are going to 
  // receive notifications from the above topics
  //
  subscribeInitialConsumer();
}

origin: org.n52.amused/amused-wsn-impl

public void initialize() 
  throws SoapFault
{
  super.initialize();
  
  //
  // add NotificationMessage to the collection of serializable types in 
  // case the user forgot to put it in muse.xml
  //
  SerializerRegistry registry = SerializerRegistry.getInstance();
  registry.registerSerializer(NotificationMessage.class, new NotificationMessageSerializer());
  
  //
  // add message handler for <Notify/>, which has array parameters 
  // that are outside our WSDL conventions
  //
  setMessageHandler(createNotifyHandler());
}

origin: org.n52.amused/amused-wsrf-impl

throws SoapFault
super.initialize();
org.apache.muse.coreAbstractCapability

Javadoc

AbstractCapability provides a foundation for user-defined capabilities by allowing users to focus on their operations and capability-specific logic without having to worry about maintaining Muse components and other plumbing work.

The implementations of the initialization and shutdown routines are mostly no-ops. Nevertheless, if these methods are overridden by concrete capability classes, the implementations should be sure to call the parent class version (via 'super') before executing their own logic; for example, a new version of the initialize() method should always start with a call to super.initialize(). As the class hierarchy grows, this ensures that startup and shutdown tasks are always performed in the proper order.

Most used methods

  • initialize
  • getInitializationParameters
  • getPersistence
  • getResource
  • initializeCompleted
  • setMessageHandler
  • setResource

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • 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