KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > ChannelFactory


1 // $Id: ChannelFactory.java,v 1.2 2004/07/31 22:14:18 jiwils Exp $
2

3 package org.jgroups;
4
5 /**
6    A channel factory takes care of creation of channel implementations. Subclasses will create
7    different implementations.
8  */

9 public interface ChannelFactory {
10
11     /**
12        Creates an instance implementing the <code>Channel</code> interface.
13        @param properties The specification of the protocol stack (underneath the channel).
14               A <code>null</code> value means use the default properties.
15        @exception ChannelException Thrown when the creation of the channel failed, e.g.
16                   the <code>properties</code> specified were incompatible (e.g. a missing
17           UDP layer etc.)
18        @deprecated Channel factories should pass configuration information
19                    related to the protocol stack during construction or via
20                    another method before attempting to create any channels.
21      */

22     Channel createChannel(Object JavaDoc properties) throws ChannelException;
23
24     /**
25      * Creates an instance implementing the <code>Channel</code> interface.
26      * <p>
27      * Protocol stack configuration information should be passed to implementing
28      * factories before this method is called.
29      *
30      * @throws ChannelException if the creation of the channel failed.
31      */

32      Channel createChannel() throws ChannelException;
33 }
34
Popular Tags