blob: 2539f0d5f6213032cd64e60ba051b82eee4954df [file] [log] [blame]
/*
*/
package org.taverna.server.localworker.remote;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.rmi.Remote;
import java.rmi.RemoteException;
import javax.annotation.Nonnull;
/**
* An event listener that is attached to a {@link RemoteSingleRun}.
*
* @author Donal Fellows
*/
public interface RemoteListener extends Remote {
/**
* @return The name of the listener.
* @throws RemoteException
* If anything goes wrong with the communication.
*/
@Nonnull
public String getName() throws RemoteException;
/**
* @return The type of the listener.
* @throws RemoteException
* If anything goes wrong with the communication.
*/
@Nonnull
public String getType() throws RemoteException;
/**
* @return The configuration document for the listener.
* @throws RemoteException
* If anything goes wrong with the communication.
*/
@Nonnull
public String getConfiguration() throws RemoteException;
/**
* @return The supported properties of the listener.
* @throws RemoteException
* If anything goes wrong with the communication.
*/
@Nonnull
public String[] listProperties() throws RemoteException;
/**
* Get the value of a particular property, which should be listed in the
* {@link #listProperties()} method.
*
* @param propName
* The name of the property to read.
* @return The value of the property.
* @throws RemoteException
* If anything goes wrong with the communication.
*/
@Nonnull
public String getProperty(@Nonnull String propName) throws RemoteException;
/**
* Set the value of a particular property, which should be listed in the
* {@link #listProperties()} method.
*
* @param propName
* The name of the property to write.
* @param value
* The value to set the property to.
* @throws RemoteException
* If anything goes wrong with the communication.
*/
public void setProperty(@Nonnull String propName, @Nonnull String value)
throws RemoteException;
}