com.sun.jini.example.browser
Class Browser
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
com.sun.jini.example.browser.Browser
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
public class Browser
- extends JFrame
Example service browser. See the package documentation for details.
- Author:
- Sun Microsystems, Inc.
- See Also:
- Serialized Form
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Constructor Summary |
Browser(ActionListener exiter,
Configuration config)
Creates an instance with the given action listener for the Exit
menu item and the given configuration. |
Browser(String[] args,
LifeCycle lc)
Creates an instance with the given command line arguments and
life cycle callback. |
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
BROWSER
static final String BROWSER
- See Also:
- Constant Field Values
logger
static final Logger logger
ctx
private transient SecurityContext ctx
ccl
private transient ClassLoader ccl
config
transient Configuration config
disco
private transient DiscoveryGroupManagement disco
lookup
private transient ServiceRegistrar lookup
eventSource
private transient Object eventSource
eventID
private transient long eventID
seqNo
private transient long seqNo
exiter
private transient ActionListener exiter
tmpl
private transient ServiceTemplate tmpl
listen
private transient Browser.Listener listen
adder
private transient Browser.LookupListener adder
elease
private transient Lease elease
leasePreparer
transient ProxyPreparer leasePreparer
servicePreparer
transient ProxyPreparer servicePreparer
adminPreparer
transient ProxyPreparer adminPreparer
locatorConstraints
private transient MethodConstraints locatorConstraints
leaseMgr
transient LeaseRenewalManager leaseMgr
lnotify
private transient LeaseListener lnotify
ignoreInterfaces
private transient List ignoreInterfaces
text
private transient JTextArea text
registrars
private transient JMenu registrars
esuper
private transient JCheckBoxMenuItem esuper
ssuper
private transient JCheckBoxMenuItem ssuper
sclass
private transient JCheckBoxMenuItem sclass
isAdmin
private transient boolean isAdmin
autoConfirm
private transient volatile boolean autoConfirm
list
private transient JList list
listModel
private transient DefaultListModel listModel
dummyModel
private transient DefaultListModel dummyModel
listScrollPane
private transient JScrollPane listScrollPane
icons
private static Icon[] icons
Browser
public Browser(ActionListener exiter,
Configuration config)
throws ConfigurationException,
IOException
- Creates an instance with the given action listener for the Exit
menu item and the given configuration. The action listener defaults
to an instance of
Exit
. The action listener can be
overridden by a configuration entry. The configuration
defaults to an empty configuration.
- Parameters:
exiter
- the action listener, or null
config
- the configuration, or null
- Throws:
ConfigurationException
IOException
Browser
public Browser(String[] args,
LifeCycle lc)
throws ConfigurationException,
LoginException,
IOException
- Creates an instance with the given command line arguments and
life cycle callback. See the package documentation for details
of the command line arguments. The default action listener for
the Exit menu item calls the
dispose
method of
this instance, cancels any lookup service event registration lease,
unexports any remote event listener, and calls the
unregister
method of the life cycle
callback. The action listener can be overridden by a configuration
entry.
- Parameters:
args
- command line argumentslc
- life cycle callback, or null
.
- Throws:
ConfigurationException
LoginException
IOException
init
private void init(ActionListener exiter,
Configuration config)
throws ConfigurationException,
IOException
- Throws:
ConfigurationException
IOException
typeName
private static String typeName(Class type)
setText
private void setText(boolean match)
genText
private String genText(boolean match)
genEntries
private void genEntries(StringBuffer buf,
Entry[] entries,
boolean showNulls)
valid
private static boolean valid(Field f)
genMatches
private void genMatches(StringBuffer buf,
boolean match)
addNone
private static void addNone(JMenu menu)
addOne
private void addOne(ServiceRegistrar registrar)
getInterfaces
static Class[] getInterfaces(Class c)
isAutoConfirm
boolean isAutoConfirm()
- Indicates whether auto confirm is enabled to prevent from the user
having to click the 'Yes' button in the a popup window to confirm a
modification to the service browser pane is allowed to take place as
result of a service being removed, or its lookup attributes being
changed.
- Returns:
true
in case no popup is required to have the user
confirm the modifications, false
otherwise
wrap
ActionListener wrap(ActionListener l)
wrap
MenuListener wrap(MenuListener l)
wrap
MouseListener wrap(MouseListener l)
wrap
WindowListener wrap(WindowListener a)
wrap
Runnable wrap(Runnable r)
wrap
private Object wrap(Object obj,
Class iface)
resetTmpl
private void resetTmpl()
reset
private void reset()
setGroups
private void setGroups(String[] groups)
parseList
private static String[] parseList(String names,
boolean groups)
cancelLease
private void cancelLease()
update
private void update()
failure
private void failure(Throwable t)
main
public static void main(String[] args)
- Runs the service browser. See the package documentation for details.
- Parameters:
args
- command line arguments
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.