FileDocCategorySizeDatePackage
MailboxRegistration.javaAPI DocExample2380Thu Mar 16 11:55:26 GMT 2000net.jini.event

MailboxRegistration.java

/*
 * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * The contents of this file are subject to the Sun(TM) Community Source
 * License, Jini(TM) Technology Core Platform, v. 1.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.sun.com/jini. Software
 * distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the  
 * License for the specific language governing rights and limitations
 * under the License.
 * 
 * The Original Code is Jini Technology Core Platform code, version 1.0.
 * The Developer of the Original Code is Sun Microsystems, Inc. Portions
 * created by Sun Microsystems, Inc. are Copyright (C) 1999 Sun
 * Microsystems, Inc. All Rights Reserved.
 * 
 * Contributor(s): Sun Microsystems, Inc.
 * 
 * The contents of this file comply with the Jini Technology
 * Core Platform Compatibility Kit Version 1.0
 * 
 * Tester(s): Sun Microsystems, Inc.
 * 
 * Test Platform(s): Java(TM) 2 SDK v1.2.2 Solaris(TM) Reference
 *                   Implementation (Final) on Solaris 2.6
 * 
 *                   Java 2 SDK v1.2.2 Microsoft Windows 95/98/NT 
 *                   Production Release (Final) on Microsoft Windows 
 *                   NT 4.0 SP4
 * 
 * CopyrightVersion 1.1Alpha_JXP
 */
package net.jini.event;

import java.rmi.RemoteException;

import net.jini.core.event.RemoteEventListener;
import net.jini.core.lease.Lease;


/**
 * A <code>MailboxRegistration</code> encapsulates all
 * that is needed by clients to interact with an event
 * mailbox.
 *
 * @author Gary Holness
 */
public interface MailboxRegistration {

    /**
     * Returns the <code>Lease</code> object which
     * encapsulates the usage duration of mailbox
     * services.
     */
    public Lease getLease();

    /**
     * Returns the <code>RemoteEventListener</code> provided
     * by the event mailbox for use by clients.
     */
    public RemoteEventListener getListener();

    /**
     * Turns on the event faucet sending events to the
     * specified forwarding target object.
     */
    public void enableDelivery(RemoteEventListener target)
		    throws RemoteException;

    /**
     * Turns off the event faucet.
     */
    public void disableDelivery() throws RemoteException;
}